Skip to content

Fix/pagination cursor bench schema tts scan#1008

Open
lonerthefirst3-sudo wants to merge 4 commits into
solutions-plug:mainfrom
lonerthefirst3-sudo:fix/pagination-cursor-bench-schema-tts-scan
Open

Fix/pagination cursor bench schema tts scan#1008
lonerthefirst3-sudo wants to merge 4 commits into
solutions-plug:mainfrom
lonerthefirst3-sudo:fix/pagination-cursor-bench-schema-tts-scan

Conversation

@lonerthefirst3-sudo

Copy link
Copy Markdown

Description

Type of Change

  • Bug fix
  • New feature
  • Refactor / code cleanup
  • Documentation update
  • CI / tooling change
  • Breaking change

Testing Done

Checklist

  • Tests pass locally
  • Documentation updated (if applicable)
  • No breaking changes, or breaking changes are documented above

Related Issues

lonerthefirst3-sudo and others added 4 commits June 27, 2026 17:24
Adds format validation for cursor values in validate_pagination so that
tampered/invalid cursors (containing <, >, null bytes, etc.) return
400 Bad Request instead of propagating to the database and risking a 500.

Adds PageResponse<T> builder that trims the sentinel row and sets
next_cursor only when there is a next page (last page gets no field).

New tests cover: empty result set, single-item result, exactly one full
page, limit-boundary sentinel, valid-looking cursor (deleted-item path),
tampered cursors with invalid chars, null bytes, and empty string, and
asserts the error produces HTTP 400.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nchmarks branch

The existing api-criterion-benchmarks job compared against a 10% threshold;
raises it to 20% per the acceptance criteria.

The save-api-bench-baseline job previously filed a PR to update
baseline.json in the main tree; now it pushes directly to a dedicated
`benchmarks` orphan branch (api-benchmark-baseline.json) so the file is
not mixed with source history. The comparison step on PRs first tries the
branch baseline, falling back to the committed seed file on first run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a schema-drift-check CI job that:
  - Spins up a fresh PostgreSQL 16 service container
  - Applies every migration in services/api/database/migrations/ in order,
    failing immediately if any migration file errors
  - Dumps the resulting schema with pg_dump --schema-only --no-owner
  - Normalises and diffs the dump against the committed snapshot at
    services/api/database/schema.sql
  - Fails with a clear diff output and remediation instructions if drift is
    detected; uploads the live dump as a CI artifact for inspection

Also adds the initial schema.sql snapshot derived from migrations 000–016.
The snapshot must be updated as part of every migration PR.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The container-scanning job previously built and scanned only the API
Docker image, leaving the TTS service (services/tts/Dockerfile) unscanned.

Adds a build + Trivy scan step for the TTS image in the same job, using
the same severity threshold (CRITICAL,HIGH, exit-code 1). Each image's
SARIF output is uploaded with a distinct category (trivy-api / trivy-tts)
so findings appear under separate entries in the GitHub Security tab.

npm audit --audit-level=high for TTS dependencies was already present in
dependency-scan.yml and is unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@lonerthefirst3-sudo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant