Built-in services · rule
flag.store_required
An app declares flags but no database named to keep their state in, because it has several databases or none.
Area 16, Built-in services; not declinable; the next step is usually the human's.
Why Jadpo refuses it
Each flag's current value, and who gets which, is kept in a table of
your app's database, so a change made while the app runs reaches every
server. With one database that is the one. With several, any of them
could hold it, and Jadpo won't choose one for you: application { flags: { store: } } names it, and with no database at all there is nowhere to
keep it.
What it looks like
flags.jadpo, in an app with two databases, archive and main:
flags { /// The one-page checkout replacing the three-step form. new_checkout: Bool { default: false owner: "payments" expires: "2099-01-31" }}
error The flags have no database named to keep their state in
--> flags.jadpo:1:1
|1 | flags { | ^^^^^ no store for their state
- reason
- Each flag's current value, and who gets which, is kept in a database so a change reaches every server while the app runs; this application has
archiveandmain, andapp.jadponames none withflags: { store: }. - next
- Add
flags: { store: archive }toapplication { }inapp.jadpo(human) - rule
- flag.
store_ required - help
- https://jadpo.
dev/docs/errors/flag. store_ required
(human) at the end of the next: line tells your coding agent to stop
and ask you which fix you want, because the choice is yours to make: it
decides which database keeps the state of every flag in the app.
How to fix it
The question is which database should keep the flags' state. It holds every flag's, so one database answers it for the whole app.
If one database should keep it, name it in flags: in app.jadpo.
The next step suggests the first of them, here archive:
flags: { store: archive }
Each flag's state is now kept in archive, in a system table its first
migration creates, jadpo_flags.
Related
Markdown for agents: /docs/errors/flag.store_required.md.Built from Jadpo main at e00e61f.