Skip to content

test(backend): route persona authz matrix and read-only restore drill - #1575

Merged
mimijuwonlo-commits merged 1 commit into
Split-Naira:mainfrom
sammy123-bot:hardening/route-authz-matrix-and-restore-drill
Oct 22, 2026
Merged

mimijuwonlo-commits merged 1 commit into
Split-Naira:mainfrom
sammy123-bot:hardening/route-authz-matrix-and-restore-drill

Conversation

@sammy123-bot

Copy link
Copy Markdown
Contributor

Authorization matrix:

  • Add collaboration.authz-matrix.test.ts: every persona (anonymous, malformed, owner, admin, editor, viewer, unrelated) against every collaboration resource route through the real router, plus public routes and boundaries (body-spoofed roles, cross-project access, fail-closed resolver, roleless collaborator, owner listed as viewer, whitespace and lower-cased headers, post-transfer revocation, denied cancel is a no-op).
  • No guards changed; route-level coverage only.

Restore drill:

  • Add src/scripts/restore-drill.ts: --capture records per-table row counts, order-independent SHA-256 row checksums and exact BigInt financial totals (no row contents or wallet addresses); --validate diffs a restored DB against it and runs the existing runDatabaseConsistencyAudit on the restore. Read-only; validation requires RESTORE_DRILL_TARGET=restore.
  • Add restore-drill.test.ts for success, failure and boundary cases.
  • npm scripts restore-drill:capture / restore-drill:validate.

Docs: authorization-coverage-tests.md persona matrix, postgres-backup-restore runbook section 3.5, CHANGELOG.

Summary

Closes #1455
closes #1470
closes #1482
closes #1480

Changes

Testing

  • Unit tests added / updated
  • Integration / E2E tests pass
  • Manually verified on local stack

PR Checklist

  • Code follows the project's style guide
  • Tests written/updated and passing
  • No console.log or debug statements left in
  • Environment variables added to .env.example if needed
  • Documentation updated if behaviour changed
  • Soroban contracts tested on Stellar testnet

Deploy Impact

Risk level

  • Low — docs/config only, no logic change
  • Medium — logic change, backward-compatible
  • High — breaking change, contract change, or schema migration

Contract changes

  • No contract changes
  • Contract changes included — migration plan:

Database migrations

  • No migrations
  • Migration included — rollback script:

Environment variables

  • No new env vars
  • New env vars added to .env.example

Rollback plan


See release readiness checklist for
the full pre-deploy gate.

Authorization matrix:
- Add collaboration.authz-matrix.test.ts: every persona (anonymous,
  malformed, owner, admin, editor, viewer, unrelated) against every
  collaboration resource route through the real router, plus public routes
  and boundaries (body-spoofed roles, cross-project access, fail-closed
  resolver, roleless collaborator, owner listed as viewer, whitespace and
  lower-cased headers, post-transfer revocation, denied cancel is a no-op).
- No guards changed; route-level coverage only.

Restore drill:
- Add src/scripts/restore-drill.ts: --capture records per-table row counts,
  order-independent SHA-256 row checksums and exact BigInt financial totals
  (no row contents or wallet addresses); --validate diffs a restored DB
  against it and runs the existing runDatabaseConsistencyAudit on the
  restore. Read-only; validation requires RESTORE_DRILL_TARGET=restore.
- Add restore-drill.test.ts for success, failure and boundary cases.
- npm scripts restore-drill:capture / restore-drill:validate.

Docs: authorization-coverage-tests.md persona matrix, postgres-backup-restore
runbook section 3.5, CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Oct 20, 2026

Copy link
Copy Markdown

@sammy123-bot 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

@mimijuwonlo-commits
mimijuwonlo-commits merged commit 044976e into Split-Naira:main Oct 22, 2026
5 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants