Skip to content

Clickwrap subapp e2e - #4

Draft
pranav-shridhar wants to merge 2 commits into
spd-48307-setup-test-db-and-basic-db-repofrom
tars-clickwrap-subapp
Draft

Clickwrap subapp e2e#4
pranav-shridhar wants to merge 2 commits into
spd-48307-setup-test-db-and-basic-db-repofrom
tars-clickwrap-subapp

Conversation

@pranav-shridhar

@pranav-shridhar pranav-shridhar commented Jul 10, 2026

Copy link
Copy Markdown

Generated description

Below is a concise technical summary of the changes proposed in this PR:
Implement a full clickwrap packet management surface by enriching the domain models, repository, and use cases so the new FastAPI router can list, create, update, and map agreements with workspace isolation and default settings wired through the app lifecycle. Integrate AdminHMACMiddleware and request context wiring so inbound admin traffic carries workspace/org headers and is authenticated before hitting the clickwrap endpoints.

TopicDetails
Other Other files
Modified files (1)
  • tests/core/__init__.py
Latest Contributors(1)
UserCommitDate
pranav.s@spotdraft.comAdd HMAC verification ...July 09, 2026
Packet CRUD Flow Implement packet CRUD flow across PacketDBRepository, domain models, use cases, router, and schemas while wiring request context through deps and main, ensuring workspace isolation, slug/ip validation, default settings, agreement mappings, and exported helpers are covered by the new router and tests (including factories, repository, use case, and presentation suites).
Modified files (20)
  • app/clickwrap/data/postgres/db_repo.py
  • app/clickwrap/domain/domain_models.py
  • app/clickwrap/domain/use_cases/__init__.py
  • app/clickwrap/domain/use_cases/create_packet_use_case.py
  • app/clickwrap/domain/use_cases/get_packet_use_case.py
  • app/clickwrap/domain/use_cases/list_packets_use_case.py
  • app/clickwrap/domain/use_cases/update_packet_mappings_use_case.py
  • app/clickwrap/domain/use_cases/update_packet_use_case.py
  • app/clickwrap/exceptions.py
  • app/clickwrap/presentation/router.py
  • app/clickwrap/presentation/schemas.py
  • app/core/deps.py
  • app/main.py
  • tests/clickwrap/data/test_packet_db_repo.py
  • tests/clickwrap/domain/__init__.py
  • tests/clickwrap/domain/use_cases/__init__.py
  • tests/clickwrap/domain/use_cases/test_create_packet_use_case.py
  • tests/clickwrap/presentation/__init__.py
  • tests/clickwrap/presentation/test_clickwrap_api.py
  • tests/factories.py
Latest Contributors(2)
UserCommitDate
pranav.s@spotdraft.comAdd clickwrap admin AP...July 09, 2026
aditya.raj@spotdraft.com[]: add DB repo test i...July 08, 2026
Admin HMAC Enforce admin-side HMAC verification by adding AdminHMACMiddleware, signing helpers, configuration, and regression tests so sensitive /api/v2/clickwraps traffic is rejected when headers are missing, malformed, or expired before it reaches the API surface.
Modified files (5)
  • app/core/config.py
  • app/core/hmac_auth.py
  • app/main.py
  • tests/clickwrap/presentation/test_clickwrap_api.py
  • tests/core/test_hmac_auth.py
Latest Contributors(2)
UserCommitDate
pranav.s@spotdraft.comAdd clickwrap admin AP...July 09, 2026
aditya.raj@spotdraft.comAdds the initial Postg...July 06, 2026
Review this PR on Baz | Customize your next review

pranav-shridhar and others added 2 commits July 9, 2026 17:03
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
raise PacketNotFoundError()
return settings

async def _get_mapped_agreement_summaries(

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed. Recheck

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant