Initial reliable release of consent engine

This commit is contained in:
Deyson Thomé
2026-09-02 14:19:05 -03:00
commit 9e1082d47b
22 changed files with 3377 additions and 0 deletions
+57
View File
@@ -0,0 +1,57 @@
# Universal Cookie Consent — Jurisdiction Engine v1
Stage 3.2 introduces a pure, deterministic Jurisdiction Engine.
## Responsibilities
The engine resolves a jurisdiction context and maps it to a policy family.
It deliberately does **not**:
- read IP addresses;
- call geolocation APIs;
- access browser location;
- inspect GPC;
- enforce consent;
- modify the Core;
- integrate GTM;
- provide legal advice.
## Modes
- `fixed`: the site explicitly selects a jurisdiction.
- `auto`: the site supports multiple jurisdictions and supplies available signals.
- `global`: the site deliberately selects the global baseline for everyone.
## Resolution priority
`site-config` > `server` > `application` > `browser` > `fallback`
The resolver is deterministic and uses only supplied signals.
## Initial catalog
- `global`
- `us`
- `us-ma`
- `us-ca`
- `eu`
The policy catalog is intentionally a structural placeholder. Detailed legal requirements will be researched and added in a later policy stage rather than being guessed or embedded in the resolver.
## Tests
Node regression:
```bash
node tests/jurisdiction-test.mjs
```
Browser Test Lab:
```bash
python -m http.server 8000
```
Then open:
`http://localhost:8000/tests/jurisdiction-test.html`