Domain, backend and persistence#
Panache active-record entities#
Superseded · 2026-09-25 · #14 · by #559
Since #559 there are no entities. The Go backend keeps its data as DynamoDB items (serverless.md). What follows is the Quarkus backend's model.
Decision. Entities extend PanacheEntityBase, expose public fields and carry their own
queries. No repository layer.
Why. It is the idiomatic Quarkus style, and Hibernate rewrites field access into accessor calls at build time, so the public fields are not the encapsulation hole they look like. A repository layer over two entities would be ceremony.
Cost. Checkstyle's VisibilityModifier check had to be switched off, and the domain
objects know about persistence.
Liquibase, not Hibernate-managed schema#
Superseded · 2026-09-25 · #14 · by #559
Since #559 there is no relational schema. The Go backend's table has none to migrate. What
follows is how the Quarkus backend's was managed; the tag pre-serverless keeps the changelogs.
Decision. quarkus.hibernate-orm.schema-management.strategy=validate, with Liquibase
changelogs applied at startup.
Why. Schema changes should be reviewable artifacts checked in beside the code that
needs them, and the application should fail fast on a schema it does not recognise rather
than quietly adapting. The todoitem → task rename is the case that proves the point —
Hibernate would have created a second table and left the first.
Rejected. import.sql plus a generated schema, which was the starting point.
The due-date rule applies to filing a task, not to changing one#
Accepted · 2026-09-27 · #51
Revised in part: "today" is anyone's today, so the rule is @TodaySomewhere now
(A new task's due date may be today anywhere, #425).
Decision. @FutureOrPresent lives on TaskCreateRequest alone. It is gone from the
Task entity and absent from TaskUpdateRequest, so an overdue task can be edited and
completed while a new one still cannot be filed in the past.
Why. The old rule made a task un-editable the day after it came due. It sat on the entity
as well as the request, and Bean Validation runs on flush, so a stored task silently became
invalid as time passed — no edit required. Because the update endpoint replaces the whole task
rather than patching it, that took the state change down with it: ticking off something late,
which is the single most common thing anyone wants to do with a board, returned 400. Confirmed
by writing the test first and watching it fail with Expected status code <200> but was <400>.
Why two records rather than validation groups. @Valid validates the Default group only.
Putting @FutureOrPresent(groups = OnCreate.class) on a shared record and annotating create
with @ConvertGroup(from = Default.class, to = OnCreate.class) would validate the date rule and
silently stop validating @NotBlank, @Size and the @NotNulls. That failure is invisible —
the endpoint still works, it just stops rejecting rubbish. TaskCreateRequest and
TaskUpdateRequest duplicate four field declarations and cannot fail that way.
Cost. Two records to keep in step, and a TaskFields interface so apply still takes one
parameter type. Nothing stops a client backdating an existing task, which is a feature more
than a risk: correcting a date you typed wrong is now possible.
The database defines the enums, and the changelogs were squashed to say so#
Superseded · 2026-09-30 · #79 · by #559
Since #559 there is no PostgreSQL schema. The states and importances are checked by the Go backend and the contract's enums. What follows is why the Quarkus backend's database defined them.
Decision. state and importance are native PostgreSQL enum types, task_state and
task_importance, created in 001-baseline.xml. That file is the whole schema as one
changelog, replacing the three that had built it up.
Why an enum type rather than VARCHAR. The column was VARCHAR(16) with no constraint, so
the database would have accepted 'BANANA'. What stood between it and a bad value was Jackson's
deserialisation, Bean Validation, and the frontend's generated schema — all of them in the
application. That is fine while this application is the only writer, and it stops being fine the
moment anything else writes: a SQL client, a fix applied by hand, a second service. A column
whose legal values are written down in the database does not depend on who is doing the writing.
Why the changelogs were squashed. The sequence was todoitem, then app_user, then the
replacement of todoitem by task. No database it applied to outlived it — every environment here
is built from scratch — so the only thing the history added was having to read three files to
learn the shape of two tables. It cost a one-off reset, which Troubleshooting records,
because Liquibase refuses to run against a databasechangelog naming changesets that no longer
exist.
What the mapping needs, and why both halves. @JdbcTypeCode(SqlTypes.NAMED_ENUM) makes the
driver send the enum rather than a varchar parameter, which PostgreSQL will not assign to an
enum column without a cast. @Column(columnDefinition = "task_state") names the type, because
Hibernate otherwise derives it from the Java class and looks for taskstate. Neither is
optional, and dropping either leaves an application that still compiles.
The cost, stated rather than discovered. Adding a value later is a new changeSet with
ALTER TYPE ... ADD VALUE, which PostgreSQL allows. Renaming or removing one is not: it needs a
new type and a column rewrite. That asymmetry is the price of the database enforcing the values,
and it is worth paying for a set of three that describes a workflow.
The type and the Java enum are declared twice, so a test holds them together.
TaskEnumColumnTest asserts that both columns really are enum types and that the type's labels
match the Java constants exactly, in order. Drift fails the build rather than the first request
that uses the new value — checked by adding a constant on one side and watching it fail, not
assumed.
Rejected: a CHECK constraint. It would have enforced the values with none of the
asymmetry above, and ALTER TABLE ... DROP CONSTRAINT would make changes easier. It was
rejected because a check constraint states the values in a condition rather than as a type:
nothing else can refer to it, information_schema does not describe it as a domain of values,
and every table wanting the same set repeats the condition. The enum is the thing PostgreSQL
has for this.
Rejected: leaving it as VARCHAR and relying on the application. That is what was there,
and the argument for it — only this application writes — is an argument that holds until it
does not.
The schema carries the constraints, and every string has a bound#
Accepted · 2026-09-30 · #80
Revised in part on 2026-11-15 (#559): there is no schema to carry the constraints any more. The
bounds stand: the Go backend checks the same ones (serverless/internal/board/rules.go), and the
contract states them.
Decision. Jakarta Bean Validation annotations on the response records, not only on the requests, with these bounds:
| Field | Max | Why that number |
|---|---|---|
description |
255 | The column width; the two must agree or a valid value is a 500 |
email |
254 | RFC 5321: a 64-character local part, an at sign, a domain of up to 255 |
| display name | 255 | Not stored, so only the schema bounds it |
| any URL | 2048 | The practical ceiling browsers have long enforced |
| provider id | 64 | Our own configuration key, and short |
| provider label | 100 | A word or two on a button |
Why bound them at all. The frontend compiles these schemas into the validators it checks
every response with, so a bound written here is enforced in the browser. Before this, every
string on the wire was unbounded: description could exceed the column that stores it, and
nothing said an email was an email.
Why standards-based rather than tighter. A bound that rejects a legitimate value is worse than one that is loose. A provider's picture URL carries size and crop parameters and is routinely a few hundred characters; 2048 bounds it without guessing at a provider's habits.
@NotNull replaced the hand-written required lists, except where required and non-null
differ. AuthProviderResponse.loginUrl is required and null for an unusable provider, and
available is a primitive, so that record still lists its required properties on the type.
Rejected: Optional<T> for the optional fields, which issue #70 asked for. Measured rather
than assumed: a single Optional component costs the operation its schema reference. The
component schema survives, but /api/auth/me stops declaring what it returns, so Redoc and any
generator lose the link. Optional is used in service signatures instead, where it helps and
touches no schema.
@Email turned out to be runtime-only. SmallRye emits nothing in the schema for it, so the
document says what the string is through @Schema(format = "email"). The frontend registers
email as a regular expression, deliberately as loose as the backend's own constraint: a
stricter pattern would reject an address the backend had already accepted and stored.
A side effect worth recording: no operation had declared its response schema. Every
@APIResponse that specified @Content for its examples had suppressed the schema SmallRye
would otherwise have derived, so the document described five endpoints that returned something
unspecified. OpenApiContractTest now asserts the reference exists.
The one cost. maxLength makes Ajv's compiled validators call into ajv/dist/runtime,
which the generator previously refused outright. The check now allows Ajv's own helpers, which
Vite bundles at build time, and still refuses any other package: adding format through
ajv-formats would land there, which is why date and email are regular expressions. ajv
remains a devDependency and dependencies is still React alone. The bundle grew by 2.5 kB.
Wire identifiers are constants, and a GET's query count is asserted#
Superseded · 2026-09-30 · #84 · by #559
Since #559 neither is there. The constants were the Quarkus backend's Java, and the query count its SQL; the Go backend's wire types are generated from the contract, and each request reads the table by key. What follows is why the Quarkus backend did both.
Decision. The OpenID Connect claim names this application reads live in OidcClaims, and
TaskQueryCountTest holds the list endpoint to a constant number of database statements.
Why the claim names. They were literals at each call site: jwt.getClaim("email"),
jwt.getClaim("picture"). A claim name is a wire identifier, and misspelling one compiles,
passes a test that stubs the token with the same misspelling, and surfaces only as an empty
field in the browser.
What the standard library actually covers, since the issue asked. MicroProfile JWT's
Claims enum names each claim by its own name(), so Claims.email.name() is "email" and
is used. It has no picture. It does have full_name, which is not OpenID Connect's
name claim — the constant is called full_name and so is the claim it stands for. So one of
the three is covered by the standard and two are declared here, with that written down so the
search is not repeated.
Why the query count is a test rather than a rule. The rule is that a GET runs a constant number of statements — one ideally, two or three acceptable — and never a number that grows with the rows returned. Nothing else notices when that breaks: the responses stay correct, the tests stay green, and only the statement count moves. The change that causes it is usually somewhere else entirely, so the count is what has to be asserted.
The test's limits, stated rather than overread. Task.owner cannot produce an N+1 however
it is fetched, because every task in one response belongs to the same user and that user is
already in the persistence context from resolving the caller — touching it per row costs
nothing. The test was validated against genuine per-row work instead, which took the count from
three to twelve and failed both assertions. Its value is in guarding what comes later: a
collection on Task, an association added to a response.
Rejected: extracting every repeated literal. The component names inside
@Schema(requiredProperties = ...) are repeated, and turning them into constants would make
them harder to read while protecting nothing a rename would not also break. The better answer
was removing most of those lists, which @NotNull on the components already did.
Rejected: enabling Hibernate statistics everywhere. Collecting them costs something and the
production application has no use for the numbers, so
%test.quarkus.hibernate-orm.statistics=true is test-only.
Attachments live in S3 and travel straight between it and the browser#
Accepted · 2026-10-08 · #204, #209
Revised in part: adding a draft again updates the task it became, where it was a 404 (Adding a draft again updates the task it became, #427).
Decision. A task's files (#204) are S3 objects in a private bucket. The backend never sees
their content: it hands out presigned links, a PUT link to upload and a GET link to open, and
keeps the name, type, size and object key in the attachment table.
Why presigned links. Streaming files through the backend would make it pay for every byte twice, hold ten megabytes in flight per upload, and put an object-storage proxy inside an application that is otherwise a few JSON endpoints. A link signed for one object and a few minutes is as confidential as the session that asked for it, and S3 checks it without the backend's involvement.
Why a PUT with the size signed, not a POST policy. A browser POST with a policy document can
say "at most 10 MB", which is what limiting an upload is usually built from. The AWS SDK for Java
cannot sign POST policies at all, and a hand-written policy signer is exactly the code nobody
should own. A presigned PUT signs Content-Length and Content-Type instead, which is stricter:
S3 accepts exactly the announced file and nothing else, and refuses a byte more with 403. The
browser must therefore send those headers as signed, which UploadResponse.headers lists.
AttachmentResourceTest checks the refusal against LocalStack with signature validation
switched on -- LocalStack skips it by default, and the test then passed for the wrong reason.
Why three steps, and the order of the halves. S3 and the database cannot change in one transaction, so every operation orders its two halves to fail safely. Announce writes the row, pending, before the link exists, so no object can arrive that the database does not know about. Confirm asks S3 whether the object is there with the announced size and type. Remove deletes the object before the row, so a failure in between leaves a row pointing at nothing -- harmless, and what the clean-up job of #208 finds -- rather than an object nobody can find any more.
Why the limits count pending and detached attachments. Otherwise announcing without
uploading, or deleting a task and creating another, would be a way around them. Counting and
inserting are serialised per user by locking the user's row, or a multi-file drop announcing in
parallel would have each request count the same total and all of them fit. Ten megabytes,
two per task and five per user (D1) are configuration, under taskfest.attachments.
Why deleting a task detaches rather than deletes (D3). The board's undo re-creates a deleted
task from what it still holds in the browser; for the fields that is a full restore, for a file
in S3 it cannot be. So TaskResource.delete detaches the task's attachments, the undo names them
in attachmentIds, and AttachmentSweep deletes, once a minute, what stayed detached past the
undo window (ten minutes, comfortably beyond the toast's eight seconds) and what was announced
and never confirmed within an hour. The foreign key is ON DELETE SET NULL besides, so a task
deleted any other way can never take a row with it whose object would then be lost track of; the
sweep deletes those rows, task gone and never detached, too. It re-checks each row under a lock
before deleting it, so a confirm or an undo that reached it since the sweep looked wins. An undo
re-attaches at most as many as a task may hold, whatever it names.
A draft task holds the app's files before Add (#381, Gunnar's decisions). A file shared into
the app, or picked in its add form, waited for Add, and then went up while the user watched. Now
the form starts a draft on its first file -- POST /api/tasks/drafts -- and uploads each file to it
through the attachment endpoints at once; Add is POST /api/tasks/drafts/{id}/add, validated as a
create, and the draft becomes the task with its id and files. Cancel is DELETE
/api/tasks/drafts/{id}, which removes its files at once. A draft is a Task with draft = true
(1a), not a TaskState: the states are a task's progress, and a draft has made none. Its
description and due date are null until Add (2a), which the check constraint
task_complete_unless_draft allows for drafts only. It is nowhere a task is seen: the board's
query, an update and a delete all leave drafts out. DraftSweep deletes, once a minute, drafts
started longer ago than taskfest.attachments.pending-lifetime, an hour, as long as an upload may
stay pending (3a); their files lose their task through ON DELETE SET NULL and go with the
attachment sweep. A draft's files count toward the five per user (4a): they take storage. The
website keeps holding files until Add (5a). The API change is an addition, so installed apps keep
working, and an app talking to a backend from before drafts is refused (405: the path is a task's
to it) and lets the files wait for Add as before. Adding or discarding locks the draft's row, so a
sweep meeting it waits and then finds it added or gone. Rejected: a DRAFT state, which every query on states would have had to leave out;
a separate draft aggregate whose attachments move over on Add, two tables for one thing.
Rejected: malware scanning (D4). The files are only ever opened by the person who uploaded them, so a scan would protect someone from their own file.
A row shows an image by a thumbnail the browser made (#236, Gunnar's decision). A photo of
several megabytes was scaled to a 64 px box on every board load. Now the browser, which has the
file anyway, draws a JPEG of it at 128 px on its shorter side while uploading, announces its size
with the file, and PUTs it next to the file through a second link, signed like the first for exactly
that size and image/jpeg. Confirming looks for it; Attachment.thumbnail says whether it came,
and GET …/thumbnail-link opens it. It lives under the file's key plus .thumbnail, so it needs no
row and goes wherever the file goes: removed, swept and counted as referenced by the orphan
clean-up with it. It is optional at every step -- not offered, over 64 KB
(taskfest.attachments.max-thumbnail-bytes), a PDF, or never arrived -- and the row then shows the
file. It does not count towards the limits: it is a few kilobytes, and its file already counts.
Rejected: scaling in the backend, which would have downloaded every photo from S3 again and
decoded up to 10 MB on a 1 GB task, with an image library for WebP besides. Rejected: a Lambda on
the upload event, the most moving parts -- a function to package, IAM, an event notification, an
apply -- for the same result. Images uploaded before #236 have none, and show the file.
A link is handed out again while it is fresh (#236). A browser caches a file by its URL, and a
newly signed link is a new URL each time, so every board load downloaded every preview again. Links
now work for an hour (download-link-lifetime), and ReusedLinks hands out the same one while at
least half of that is left. The answer carries Cache-Control: private, max-age up to that moment,
so the browser does not even ask again, and storage answers the GET with a Cache-Control of its
own (response-cache-control, signed into the link), so the file stays in the browser's cache. Each
backend task keeps its own links; with two, a browser may see two URLs for a file, which costs one
fetch. A presigned URL dies with the session that signed it, whatever expiry it was signed for,
and on ECS that is the task role's, which rotates: links are signed with credentials resolved for
the purpose, and one whose credentials end first says so in its expiry, so it is neither handed out
again nor cached past it. The price is that a link that leaks works for an hour rather than five minutes, to someone
who could only have got it from the owner's browser.
Deleting an account leaves a record outside the database#
Accepted · 2026-10-08 · #213, #224
Revised in part for the Go backend (#553, Gunnar's decisions): the account is marked deleted and then deleted in batches, so a failure after the mark counts as done and is finished later rather than reported; the deletion ends the account's sessions on every device, which the stored sessions allow (serverless.md); and Lambda has no start-up, so the replay runs daily and, after a restore, once against the restored table before the API is switched to it (serverless.md). A message queue for the deletion was considered and rejected (below).
Decision. A user deletes their own account (#213, Gunnar's decision; no admin role).
DELETE /api/account acts on the caller only. It writes a deletion record, then deletes each
attachment, file before row, and, in one transaction with the user's row locked, any remaining
attachment rows, the tasks and the user. The response expires this browser's session cookies.
Why a record, and why outside the database. The privacy policy promises that a deletion also
applies to a backup restored later, and the database is restored from snapshots routinely
(env.sh up, a rollback). A record kept in the database would be undone by the very restore it is
meant to survive, so it is a small object, deleted-accounts/<SHA-256 of the email>, in the
environment's attachment bucket, which a restore does not touch; its time is the object's own.
The attachment listing the orphan clean-up uses ignores everything under a prefix, so a record is
never taken for an orphan.
Why the record comes first, and is taken back on failure. Written first, there is no moment in which the account is gone but unrecorded, which a crash or an S3 outage would otherwise leave for a restore to undo. A deletion that then fails removes its record again before reporting the failure: the user is told it did not happen, so the replay must not carry it out later, taking whatever was added since. A crash between record and deletion leaves the record, and the replay finishes a deletion the user did ask for. Where records are switched off (the local container stack, no bucket), the account is deleted without one.
Re-applying, before anyone can sign in. DeletionReplay runs during start-up -- a restore
always comes with one -- and daily, and deletes again any account a record names that was created
before the deletion -- checked again under the row lock, so an account created meanwhile is never
taken for the restored one; someone who signed up again afterwards keeps theirs. The accounts are
found by hashing the emails in SQL, not by loading every user. Each record and account is handled
on its own, so one failure stops nothing else.
A session left open elsewhere starts a new account (Gunnar's decision). The session is an encrypted cookie, so the server cannot end one another device holds, and that device's next request creates the account afresh -- empty, exactly as signing in again would. A check comparing the ID token's issue time with the deletion was built and dropped: Quarkus refreshes expired ID tokens, which renews the issue time, and refusing the session left its cookie in place, so the user could not sign in again. Making the promise hold would need a tamper-proof sign-in time of our own per session; the deleted data stays deleted either way.
How long a record is kept (Gunnar's decision). Exactly as long as a snapshot or backup older
than the deletion exists: each run deletes the records older than the oldest restorable point of
the environment's database, from RDS's listing of its snapshots and retained backups, every page of
it (RdsRestorePoints); a copied snapshot counts from its original's time, which is how old its
data is (#434). When that cannot be known -- RDS refused, listed nothing, or no instance is
configured, as everywhere but AWS -- nothing is pruned. A record whose account is still there (its
re-deletion failed) is kept, and a record rewritten since it was read stays. Pruning runs daily,
not at start-up, so RDS never stands between a start and the first request.
A file still uploading can outlive the deletion (Gunnar's decision). An upload link signed before the deletion stays valid for up to ten minutes, and a file arriving through it has no row: the orphan clean-up of #208 removes it within seven days. The privacy policy says so.
The hash is pseudonymous, not anonymous. It holds no address, but anyone who knows an address can compute its hash and see that an account with it was deleted. That is said in the privacy policy. A keyed hash (HMAC) would avoid it at the price of a secret to keep and rotate; for a demo project the plain hash Gunnar chose is the proportionate answer.
Rejected: a message queue for the Go backend's deletion (#553, Gunnar's question). Handing the deletion to SQS or SNS would change little of what makes it intricate. No single write can delete an account, since a DynamoDB transaction holds at most 100 items, so a queued job would delete in the same batches of 25. A restore needs a lasting record, which a queue is not: SQS keeps a message 14 days at most and none once consumed, an SNS FIFO archive is no part of the table's backups either, and both would live beside the S3 records rather than replace them. The files already follow the table's own stream, except after a restore, where the replay deletes them itself. Standard queues deliver at least once and out of order, FIFO ones trade that for message groups and throughput limits, and either brings a dead-letter queue and its alarm. The gain would be real in one place: the batches would run outside the request, which today finishes them within the function's timeout. That holds for any account of realistic size. One too large for it is taken up again, each time removing more, by the requests still signed in -- an app's, or a new sign-in's, since a website session the sweep has passed is signed out -- and the daily replay finishes it in any case. The check of the account on every request stays either way, since only it can tell a request that a deletion is under way.
A link is a kind of attachment, kept in its row#
Accepted · 2026-10-30 · #414
Decision. A link shared into the app is an attachment of the kind LINK (text/uri-list):
its address and title in the attachment's row, object_key null, nothing in S3, available as soon
as it is added through POST /api/tasks/{id}/attachments/links. It counts against the same limits
as a file, goes through a task's undo window like one, and the board lists it beside the files with
its url, which it is opened by. A check constraint holds that a link has a URL and no object, a
file the other way round. Only http and https addresses with a host are taken, and the board
checks again before opening one.
Why an attachment, not a field on the task. It is what a shared image already is: something the task carries, listed and removed the same way, with the same limits, the same undo and the same place on the board. A field would have been a second way of carrying content, with its own rules for each of those. The kind already said what a file is; a link is one more answer to that.
Why in the database rather than as a small object in S3. There is nothing to stream: an address and a title fit a row, and keeping them there spares a link the three-step upload, the signed links and the orphan clean-up. Gunnar proposed it (30 October 2026), with the preview of the page left out.
Rejected: a preview of the page -- its og:image -- which needs the page fetched. On the phone
that would undo "reading only the raw share" (mobile-app.md); on the backend, a
server fetching any address a user gives it is a request forgery risk that needs careful limits.
Gunnar decided it was not worth it.
Adding a draft again updates the task it became#
Accepted · 2026-10-31 · #427, #442
Decision. POST /api/tasks/drafts/{id}/add takes a task the caller owns as well as a draft:
it applies the request's values to it, as the first Add did, and answers the same way, 201 with
the task. A 404 now means that no draft or task with that id is the caller's: swept, or never
theirs. The row is locked as before, so a second Add waits for the first and then finds a task.
Why. An Add can time out after the backend has made the draft the task. The app's form still says it could not add, and the next Add met a 404, which the app read as a sweep: it created the task a second time and uploaded every file again. Taking the Add again makes the retry harmless, and it carries what was edited in between, a typo fixed after the failure for one. The app only has to show the task once, when the reload after the failure had already brought it.
Cost. A task deleted elsewhere between the lost answer and the retry is still a 404, read as a sweep, and added again with its files: rare, and the user did press Add. An installed app from before this lists a retried task twice until the board is next loaded, where it used to create it twice for good. The retry's values replace the task's, its state included, so a task marked done in between is open again.
Rejected: the app looking for the draft's id on the board after a 404, which was #442's first
version. It needed a whole board fetched on the save path for one row, and threw away whatever was
edited before the retry. Rejected: telling
a task that was a draft from one created directly, with a column of its own, so that only those
are added again: a migration for a difference only a client misusing the endpoint would meet. An
Add on any task of the caller's therefore replaces its fields, as a PUT would.
A user has at most five open drafts#
Accepted · 2026-10-31 · #434
Decision. POST /api/tasks/drafts refuses a user who has five drafts open already, with a
422 and no body. Adding or discarding one makes room again; the count is taken under the lock on
the user's row that counting attachments takes (User.lockRow), so two drafts started at once
cannot both fit.
Why. Every draft is a row its owner never sees, until the sweep removes it an hour after it was abandoned, so a client starting drafts in a loop left rows behind that nobody would notice. The app opens one per add form; five leaves room for forms left open and retries. Gunnar's choice (2026-10-31). It bounds drafts only: tasks, which their owner does see, have no per-user bound, and neither does adding a draft and starting the next.
Cost. A sixth add form, while five drafts are open, gets none: the app then lets its files wait for Add, as it does with a backend from before drafts. Drafts left by a sign-out or an app closed with the form open count until they are swept, so five of them hold the next forms off drafts for up to an hour. Rejected: handing back an open draft instead of a new one, which would let two forms share one draft and its files.
A new task's due date may be today anywhere#
Accepted · 2026-10-31 · #425
Decision. A new task's due date is refused only before today in UTC-12 (@TodaySomewhere on
TaskCreateRequest), in place of @FutureOrPresent, which judged it by the server's clock.
Why. The server runs in UTC; the website and the app take "today" in the user's zone. At 21:00 in New York it is already the next day in UTC, so a task due today was refused as past, and an undo of an overdue task, which re-creates it dated the client's today, failed the same way. UTC-12 is the westernmost zone, so its today is the earliest date that is still today anywhere. Gunnar's choice (2026-10-31); an earlier draft took yesterday in UTC, which from noon UTC is nobody's today.
Cost. A user ahead of UTC-12 can file a task due yesterday. An update can set a past date anyway, so nothing new becomes possible.
Rejected: the client's own day sent with each request. Exact, but it changes the API and both clients for a rule that only keeps typos out.
A due time is optional, and its zone is too#
Accepted · 2026-11-01 · #290, #474
Revised in part: an update that leaves out both fields keeps them now (An update that leaves out the due time keeps it, #497).
Decision. A task keeps its due date, and may also have a due time (dueTime, "10:00") and,
only with a time, a time zone (timeZone, "Europe/Berlin"): model C of the investigation on #290,
Gunnar's choice. No time is an all-day task, as before; a time without a zone is floating, and
follows the reader's clock; a time with a zone is one moment, which the response carries as
dueAt for zoned tasks only. dueAt is worked out on every read with ZonedDateTime.of, so a time
in a daylight-saving gap moves later and one in an overlap is its earlier moment, and it is never
stored. A zone must be one the JVM knows by name, and a time already past today is allowed:
@TodaySomewhere stays date-only.
Why. It is the only model that covers both kinds of timed task the epic has: the pills at 08:00
wherever the owner is, and the meeting at 10:00 in Berlin seen from New York. RFC 5545's three forms
of DATE-TIME, Temporal's PlainDateTime and ZonedDateTime, and Todoist's floating and fixed
times all settled on it. Storing the local time and the zone and deriving the instant is what Jon
Skeet recommends ("Storing UTC is not a silver bullet"): zone rules change, and a stored instant
then comes out an hour wrong, where a derived one follows the JDK's next tzdata. Two separate fields
next to an unchanged dueDate, rather than one RFC 9557 string, make the change additive, a minor
version, and leave the board's grouping by date alone.
How it is held. The columns are due_time TIME(0) and time_zone VARCHAR(64), both nullable,
added by 007-due-times.xml with no migration: every existing task is all day. The time travels as
HH:mm text and is read only as that, so a time with seconds, 24:00 or one given as an array is
refused rather than stored. The zone must be one of the JVM's, exactly as written, which also
refuses a bare offset such as +02:00: an offset is not a zone, and is wrong for half the year
(option E). A zone that is a fixed offset by name, such as Etc/GMT-2 or EST, is refused for the
same reason; UTC and GMT, which are meant as themselves, are not. A stored zone the running JVM does not know --
one from newer tzdata, after a rollback -- gives the task no dueAt instead of failing every
task's read. The longest name the
JDK knows is 32 characters; the column takes twice that. A zone without a time is refused by
@ZoneOnlyWithTime and by the task_zone_only_with_time check constraint, and a time with seconds,
which TIME(0) would keep, by task_due_time_whole_minutes.
Cost. An update replaces the whole task, so a client that does not know the fields erases a time
on its next edit, ticking the task off included (#268). Since #475 the website and the app send the
two fields back unchanged, and an undo puts them back; an app installed before that release still
erases them, which is why taskfest.minimum-app-version is raised to it before anyone can set a time.
Rejected. A floating time only (A) puts the Berlin meeting at 10:00 in New York. A zone always
captured from the device (B) fires the pills at 08:00 of the zone the owner flew out of. A stored
instant with the zone's name (D) changes what dueDate means, breaks the API, and goes stale when a
zone's rules change. A time with a UTC offset (E) is a zone only half the year.
An update that leaves out the due time keeps it#
Accepted · 2026-11-02 · #497, #496
Decision. PUT /api/tasks/{id} still replaces the whole task, with one exception: a request
that leaves out both dueTime and timeZone keeps the task's. A field sent as null clears it, as
before. The two go as a pair: with only one left out, it means null, so {"dueTime": "11:00"}
without a zone makes the time floating, and a zone without a time is refused whatever is stored.
TaskUpdateRequest carries both as JsonNullable (jackson-databind-nullable), which tells a
left-out field from a null one; Gunnar's choices on #497.
Why. Apps before 1.4.0 know neither field, so their every save would erase a time another
client set. Raising taskfest.minimum-app-version to 1.4.0 (#496) only asks their users to update:
an app already open, or one whose version check times out after three seconds, still saves, and the
backend accepts it. Keeping the time works for every client without telling apps apart.
Rejected. Refusing writes from apps older than the minimum, by their X-TaskFest-App header,
with a 426: an old app would show an error on save instead of losing nothing. Each field on its own,
where a left-out one always keeps its stored value: more general, but then "no zone means floating"
holds on create only, and the zone-needs-a-time rule has to be checked against the stored values.
A hand-written check of which fields the body has, instead of JsonNullable: untyped, and the
generated schema would no longer come from the record.
The API contract is the source#
Accepted · 2026-11-14 · #559
Decision. doc/api/openapi.json is edited by hand and is the one place a wire change starts.
doc/api/generate.py checks it is valid OpenAPI 3.1 and derives the YAML and the per-type JSON
Schemas from it; the Go backend's routes and types and the frontend's types and validators are
generated from those, and Contract CI, Serverless CI and Frontend CI fail on any drift. oasdiff
still refuses a change that breaks the oldest release in use.
Why. It was generated from the Quarkus backend's records and annotations, which goes with that backend (#559): with the Go backend generated from the contract rather than the other way round, the contract has nothing left to be generated from. Writing it by hand keeps one source, in the language both clients and the backend already read.
Rejected: generating it from the Go code, which would make the Go backend the source again and need annotations or a framework it does not have.
Cost. Descriptions, examples and required fields are kept by hand; the validator catches a
malformed document, not a misleading one. Switching sources found one flaw on the way: the link
pattern used (?i), a Java regex flag that JSON Schema's ECMAScript dialect does not have,
rewritten as [Hh][Tt][Tt][Pp][Ss]?, which matches what the Java one did. The Go backend checks a
link with a pattern of its own (board/attachments.go), which nothing derives from the contract:
a change to the one needs the other by hand, and the two differ at the edges of what \s means
in each language. And oasdiff reports the rewritten pattern as a change, so the next release is a
minor rather than a patch.
A removed security requirement is no breaking change#
Accepted · 2026-11-22 · #632
Decision. oasdiff's api-security-removed is a warning for this contract, not an error:
doc/api/oasdiff-levels sets it, and Contract CI and cut-release.yml both pass that file, which
test_release_version.py holds them to.
Why. The contract's security is documentation. The backend authenticates in code
(serverless/internal/auth), and nothing generated from the contract reads it, so removing a
requirement breaks no client. As an error it would have made #632 a major release, with
oldest-supported-release moved and the minimum app version raised, for a change that sends
nothing different on the wire. Gunnar chose this over an ignore list of the 13 findings, which
would have lasted until the oldest supported release moved past them, and over keeping the old
scheme beside the new ones, which would have gone on naming Google's OpenID Connect where it is
wrong.
Cost. A real removal of a scheme from an endpoint, one a client relies on, now only warns; since the backend's code is what decides, that is a change to the backend, which its own tests catch.
At most 500 tasks per user, and the API throttled at 10 a second#
Accepted · 2026-11-16 · #607
Decision (Gunnar). A user has at most 500 tasks; the next create, or a draft added, is refused with 422, as a sixth draft is. The HTTP API is throttled at 10 requests a second with bursts of 20, down from 50 and 100, and an alarm mails when an hour holds 20,000 requests. The website and the app send their own bursts -- clearing completed tasks, undoing their deletion -- four at a time, inside that burst.
Why. The website is to be open to anyone with a Google account (#607). Drafts and attachments had limits; tasks had none, so one account could grow the table at will, and the throttle alone let a script spend a few hundred dollars a month. 500 tasks is far beyond what a person keeps; 10 a second far beyond what a person clicks; the alarm sees abuse within the hour, where the budgets see it a day or more later.
Rejected: AWS WAF rate rules, at $5 a month or more fixed, more than the environment costs, which would have throttled per caller rather than for everyone at once.
Cost. The count is a query before each create, not part of the write: creates at the same moment may each find the last place and pass the limit by a few, which a limit against a script can afford. The throttle is one bucket for everyone: a script at the ceiling slows every visitor down, which the request alarm then reports. It is the Go backend's ninth alarm, $0.10 a month per environment. The alarm and its threshold of 20,000 below the throttle's 36,000 an hour are Claude's reading of Gunnar's "add the alarm": the 50,000 first proposed lay above what the throttle lets through, and could not have fired.