Skip to content

api: minimize request statistics and correct collection activity - #3166

Merged
shizn merged 1 commit into
mainfrom
codex/ossinsight-ops-privacy-20261108
Nov 8, 2026
Merged

shizn merged 1 commit into
mainfrom
codex/ossinsight-ops-privacy-20261108

Conversation

@shizn

@shizn shizn commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Request statistics currently persist raw visitor metadata and unreviewed query input, while collection activity counts unsuccessful requests and can retain stale totals. This change minimizes new statistics and makes the existing monthly activity measure consistent with final request outcomes.

  • Reuse the existing resource/parameter allowlist for database statistics. Keep legacy IP/Origin columns schema-compatible with empty values, redact unknown paths, and skip registered health/metrics routes even with query strings. Operational security-event logging remains separate.
  • Count only successful, non-error production GET requests in the last month. Match canonical collection IDs without numeric coercion and reset collections without eligible requests to zero. Both string and numeric JSON IDs remain supported.
  • Document that this is request activity, not unique visitors or verified human popularity, and record historical retention/access work separately. This PR does not delete existing records or claim that historic exposure is resolved.

Validation: Node 24.22.1 / pnpm 10.29.3; API, pipeline, prefetch and workspace-dependency builds pass; 567 API security tests pass; five real TiDB tests pass, including persisted-row minimization and execution of the actual aggregation SQL twice against mixed fixtures. The API's collection write restriction remains intact. PR CI 42486362533 and merged-main CI 42486850417 both pass, including the container checks. Both production API servers have been rolled forward with upstream draining and restoration; synthetic production statistics verify minimized stored rows. The existing pipeline runtime now reads the updated configuration, with only the collection SQL changed and no credential or permission change. A normal transactional refresh completed successfully (job 343117009, 1.742 s): 139 collections checked, 115 counts changed, zero stale counts required clearing on this run. Public smoke checks are recorded separately. Historical retention/access work remains open.

Fixes #3165. Advances #3164; keep #3164 open for historical retention/access review.

@vercel

vercel Bot commented Nov 8, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
ossinsight-docs Ready Ready Preview Nov 8, 2026 1:44pm UTC
ossinsight-web Ready Ready Preview Nov 8, 2026 1:44pm UTC

Request Review

@shizn
shizn merged commit 1b804da into main Nov 8, 2026
5 checks passed
@shizn
shizn deleted the codex/ossinsight-ops-privacy-20261108 branch November 8, 2026 13:50

This branch was successfully deployed

2 active deployments
Preview – ossinsight-web — 68f0844a Deployed Nov 8, 2026 by vercel[bot]
Preview – ossinsight-docs — 68f0844a Deployed Nov 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pipeline: count successful collection requests and reset inactive totals

1 participant