Personal data · rule
data.retention_period
A retention's after: isn't a Duration setting in config.jadpo.
Area 15, Personal data; not declinable; the next step is usually the agent's.
Why Jadpo refuses it
How long a person's data is kept is decided per environment, and the
personal-data report says how long each kind is kept, so every retention
period is a setting in config.jadpo. Here a visitor's sign-up address
is kept for 30d written beside the field, where no environment could
change it and no report could read it as a setting.
What it looks like
main.jadpo:
entity Visitor { id: Uuid signup_ip: IpAddress? { retention: { after: 30d since: created_at } } created_at: Instant { generated: Generated.on_create }}
error after: 30d is written in place
--> main.jadpo:5:20
|5 | after: 30d | ^^^ a duration, not a setting
- reason
- A retention period is a
Durationsetting inconfig.jadpo, so each environment sets its own and the personal-data report can say how long each kind of data is kept. - next
- Add
signup_ip_retention: Duration { default: 30d }toconfig.jadpo, and writeafter: config.signup_ip_retention(agent) - rule
- data.
retention_ period - help
- https://jadpo.
dev/docs/errors/data. retention_ period
(agent) at the end of the next: line means your coding agent can make
the fix itself.
A setting that isn't a Duration, such as a Text, is refused the same
way, since it says no length of time:
config { signup_ip_retention: Text { default: "a month" }}entity Visitor { id: Uuid signup_ip: IpAddress? { retention: { after: config.signup_ip_retention since: created_at } } created_at: Instant { generated: Generated.on_create }}
error after: config.signup_ip_retention isn't a duration
--> main.jadpo:11:20
|11 | after: config.signup_ip_retention | ^^^^^^^^^^^^^^^^^^^^^^^^^^ not a `Duration` setting
- reason
after:is how long a value or record is kept, aDurationsetting;signup_ip_retentionisText.- next
- Make
signup_ip_retentionaDurationinconfig.jadpo, such assignup_ip_retention: Duration { default: 30d }(agent) - rule
- data.
retention_ period - help
- https://jadpo.
dev/docs/errors/data. retention_ period
How to fix it
If 30 days is the period wherever the app runs, add a Duration
setting with it as the default, and name it in after::
config { signup_ip_retention: Duration { default: 30d }}entity Visitor { ... signup_ip: IpAddress? { retention: { after: config.signup_ip_retention since: created_at } } ...}
Each environment can now set SIGNUP_IP_RETENTION to its own period, and
the address is cleared at the first hourly run once the visitor signed up
longer ago than that.
Related
Markdown for agents: /docs/errors/data.retention_period.md.Built from Jadpo main at e00e61f.