9
2
Fork
You've already forked platform
2

Add admin publish-legal-doc and legal re-acceptance e2e coverage #379

Open
vkobel wants to merge 3 commits from feat/legal-publish-doc into main
pull from: feat/legal-publish-doc
merge into: caution:main
caution:main
caution:fix/issue-119-logout-confirmation
caution:fix/paddle-customdata-credit-mint
caution:anton/feat/multi-user
caution:fix/issue-116-duplicate-ssh-key
caution:fix/issue-265-http-port-private
caution:fix/issue-330-remove-build-binary
caution:feat/paddle-byoc-subscriptions
caution:fix/issue-307-remove-apps
caution:feat/issue-164-account-id
caution:feat/add-tofu-lockfile-cache
caution:feat/webauthn-discoverable-login
caution:docs/issue-339-install-instructions
caution:fix/issue-336-split-qr-login-tokens
caution:fix/verify-app-source-preflight
caution:fix/many-git-push-deploy
caution:fix/issue-334-email-verification-throttle
caution:fix/issue-273-billing-url
caution:fix/issue-333-final-usage-collection
caution:fix/issue-270-low-credit-email
caution:fix/issue-301-remove-auto-topup
caution:fix/issue-320-byoc-auth-first
caution:fix/issue-348-git-progress-checklist
caution:fix/issue-321-byoc-caution-hcl
caution:fix/issue-332-resource-id-suspension
caution:fix/eif-app-mode-normalization
caution:feat/cli-stagex-container
caution:fix/eif-s3-layer-cache
caution:fix/authz-role-checks
caution:fix/cli-hangs-unsupported-ssh-url
caution:feat/print-platform-commit-dashboard
caution:fix/config-domain-validation
caution:anton/support-ssh-destroy-get
caution:fix/cli-config-dir
caution:feat/publish-build-inputs
caution:feat/locksmith-polishing
caution:fix/procfile-run-command-no-split
caution:anton/byoc-require-login
caution:fix/hcl-init-template
caution:feat/egress-default-deny
caution:ryansquared/hcl
caution:quotas
caution:anton/feat/region-routing-resource-unavailable-alert
caution:fix/attestation-502-dashboard
caution:ryansquared/systemdize
caution:fix/verify-git-credential-hang
caution:anton/fix-low-credits-alert
caution:xenushka/rename-byoc
caution:ryansquared/add-download-eif
caution:add-debug-flag
caution:test/pr1-integration-harness
caution:anton/fix/only-pass-required-env-vars
caution:ryansquared/add-database-bucket

Fix add-legal-doc-from-website.sh --activate (INSERTED_ID captured the psql command tag) and admin build_payload brace-strip that produced invalid JSON for scoped legal-notice sends.

re #368

Fix add-legal-doc-from-website.sh --activate (INSERTED_ID captured the psql command tag) and admin build_payload brace-strip that produced invalid JSON for scoped legal-notice sends. re https://codeberg.org/caution/platform/issues/368
Fix add-legal-doc-from-website.sh --activate (INSERTED_ID captured the psql command tag) and admin build_payload brace-strip that produced invalid JSON for scoped legal-notice sends.
vkobel force-pushed feat/legal-publish-doc from b63ae1be3d to fda3f320cd 2026年07月13日 09:18:37 +02:00 Compare
Author
Owner
Copy link
  • publish-legal-doc / send-legal-notices — ingest, activate, dry-run/--confirm notify, dedupe re-sends.
  • document_type is now a fully open string — no code change needed for a new type. Status/enforcement loop over whatever's active in the DB; legal_notice_batches joins on documents instead of two fixed columns.
  • Registration screen now dynamically lists whatever's active (GET /legal/active-documents) instead of hardcoding ToS/Privacy — signup consent always matches what's shown.
  • Enforcement (blocking/ack) is per-document, set at publish time. Verified server-side via direct curl, not just the modal.
  • Fixed in review: non-affirmative events (declined/notice_shown) could bypass gating; a dedupe-key format change could resend old notices; informational (non-blocking, non-ack) docs still forced the modal; a newly-added type never gated existing users.
  • 21/21 e2e steps pass (test_legal_tracking.sh), including a synthetic third type (dpa) proving generalization end to end.

Docs: docs/legal-documents.md.

Question

Sign-up currently auto-records consent without an explicit accept step. Should we require a modal confirmation on first sign-in, or keep the current approach?

- `publish-legal-doc` / `send-legal-notices` — ingest, activate, dry-run/`--confirm` notify, dedupe re-sends. - `document_type` is now a fully open string — no code change needed for a new type. Status/enforcement loop over whatever's active in the DB; `legal_notice_batches` joins on documents instead of two fixed columns. - Registration screen now dynamically lists whatever's active (`GET /legal/active-documents`) instead of hardcoding ToS/Privacy — signup consent always matches what's shown. - Enforcement (`blocking`/`ack`) is per-document, set at publish time. Verified server-side via direct `curl`, not just the modal. - Fixed in review: non-affirmative events (`declined`/`notice_shown`) could bypass gating; a dedupe-key format change could resend old notices; informational (non-blocking, non-ack) docs still forced the modal; a newly-added type never gated existing users. - 21/21 e2e steps pass (`test_legal_tracking.sh`), including a synthetic third type (`dpa`) proving generalization end to end. Docs: `docs/legal-documents.md`. ### Question Sign-up currently auto-records consent without an explicit accept step. Should we require a modal confirmation on first sign-in, or keep the current approach?
document_type is now an open string end to end: status/enforcement loop
over whatever's active in the DB, notice batches join on documents
instead of two fixed columns, and signup/registration dynamically cover
whatever's currently active instead of hardcoding two types.
Fixes found in review: non-affirmative events (declined/notice_shown)
could bypass gating, a changed dedupe-key format could resend old
notices, and informational (non-blocking, non-ack) docs still forced
the modal.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/legal-publish-doc:feat/legal-publish-doc
git switch feat/legal-publish-doc

Merge

Merge the changes and update on Forgejo.
git switch main
git merge --no-ff feat/legal-publish-doc
git switch feat/legal-publish-doc
git rebase main
git switch main
git merge --ff-only feat/legal-publish-doc
git switch feat/legal-publish-doc
git rebase main
git switch main
git merge --no-ff feat/legal-publish-doc
git switch main
git merge --squash feat/legal-publish-doc
git switch main
git merge --ff-only feat/legal-publish-doc
git switch main
git merge feat/legal-publish-doc
git push origin main
Sign in to join this conversation.
No reviewers
Labels
Clear labels
Compat/Breaking
Breaking change that won't be backward compatible
Component/Enclave-Builder
This issue affects Enclave Builder (git-push and CLI)
Component/Infrastructure
This issue affects generic Caution hosted infra components
Deploy/BYOC
Relates to Caution Bring-your-own-compute
Deploy/Full-managed
Relates to Caution fully managed cloud
Deploy/Self-hosted
Relates to Caution deployed on self-hosted infra
Interface/API
This issue affects the API
Interface/CLI
This issue affects the command line interface
Interface/Git
This issue affects the Git `push` interface
Interface/Web
This issue affects the web dashboard
Kind/Bug
Something is not working
Kind/Documentation
Documentation changes
Kind/Enhancement
Improve existing functionality
Kind/Feature
New functionality
Kind/Security
This is security issue
Kind/Testing
Issue or pull request related to testing
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
caution/platform!379
Reference in a new issue
caution/platform
No description provided.
Delete branch "feat/legal-publish-doc"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?