What AfterDelete does
A customer record can be deleted correctly and still return later when an old queue job, retry or index rebuild writes stale data back.
Example: a customer is deleted at 10:00. At 10:02, an old retry wakes up with yesterday's data. AfterDelete rejects that stale write before it can restore the search record.
AfterDelete is a scoped erasure-safety gate for synthetic identities. It is not a complete GDPR or CCPA compliance product.
How it works
AfterDelete keeps a deletion tombstone, locks writes around the customer record and checks the event generation before materializing a downstream copy. Its deterministic gate replays three known resurrection races and two safe controls against a known-broken reference, a known-good reference and the current source.
A separate static scanner checks changed Python code for literal destination calls and SQL inserts that are not declared in the reviewed destination policy. Declaring a destination does not prove its deletion behavior is correct, so the replay gate remains independent.
GitLab Duo repair
The registered GitLab Duo Agent Platform custom flow ran against controlled unsafe MR !2. It read the real diff and failed CI evidence, restored the missing tombstone and generation guard on a separate branch and opened repair MR !3.
Fresh repair pipeline 2970515764 passed. The flow did not merge or release the change. A person reviewed the result and CI stayed authoritative.
Follow the public evidence
- Unsafe MR !2: https://gitlab.com/aidash-group1/afterdelete/-/merge_requests/2
- Failed pipeline: https://gitlab.com/aidash-group1/afterdelete/-/pipelines/2970515761
- GitLab Duo session: https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/43539705/showcase/-/automate/agent-sessions/10014015
- Repair MR !3: https://gitlab.com/aidash-group1/afterdelete/-/merge_requests/3
- Passing repair pipeline: https://gitlab.com/aidash-group1/afterdelete/-/pipelines/2970515764
- Scheduled Monitor pipeline: https://gitlab.com/aidash-group1/afterdelete/-/pipelines/2987350886
- Daily synthetic Monitor job: https://gitlab.com/aidash-group1/afterdelete/-/jobs/17453176328
- Live Cloud Run viewer: https://afterdelete-gate-293866068182.us-central1.run.app
What works today
- Transactional deletion tombstones and generation-fenced worker writes
- Replays for delayed jobs, old retries and snapshot rebuilds
- Known-bad and known-good controls
- Bounded Python AST and static SQL destination discovery
- 58 passing tests
- SQLite checks plus a PostgreSQL and pgvector CI canary
- JSON, HTML and JUnit evidence with integrity manifests
- Public passing and blocked pipeline history
- Read-only FastAPI viewer on Google Cloud Run
- Human approval before merge or release
All nine GitLab lifecycle stages
- Plan: public issue #1 records the regression and acceptance criteria.
- Create: the Duo session created repair MR !3.
- Verify: the unsafe pipeline failed and the repair pipeline passed.
- Package: GitLab built the Python wheel and Google Cloud built the container.
- Secure: SAST, secret detection and the source safety check ran in CI.
- Release: the read-only viewer is live on Cloud Run.
- Configure: flow, policy, CI and container settings live in the repository.
- Monitor: an active daily schedule runs the synthetic gate; its first run passed 5/5 and saved artifacts.
- Govern: the protected default branch requires passing CI, evidence receipts are HMAC-linked and a person approves merges.
Try it
Public repository: https://gitlab.com/aidash-group1/afterdelete
Live viewer: https://afterdelete-gate-293866068182.us-central1.run.app
Demo video: https://youtu.be/vh4N_4n6o9s
Run locally with Python 3.11 or newer:
git clone https://gitlab.com/aidash-group1/afterdelete.git
cd afterdelete
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[dev]'
python -m pytest -q
afterdelete gate --output evidence/gate
python -m afterdelete.cli serve --evidence evidence/gate/report.json --port 8080
The verified checkout reports 58 passing tests. The gate reports PASS with five of five current-source scenarios passing and zero blocking destinations.
Limits
Static discovery covers literal Python sink calls and static SQL inserts. It is not a general data-flow or taint-analysis engine. The safety claim applies to writers that follow the supported transaction and locking protocol. Third-party SDKs, dynamic SQL, backups and undeclared systems still need manual review. All examples use synthetic identities.
Built With
- docker
- fastapi
- gitlab-ci/cd
- gitlab-duo-agent-platform
- google-cloud-run
- pgvector
- postgresql
- python
- sqlalchemy