Tasks
A task is a piece of work with a deadline, an owner and a status, raised by
whoever raises it and resolved by whoever is assigned. The module promises that
a breached deadline is a recorded fact and not an opinion: a task created past
its deadline is breached on arrival, and a sweep marks every other breach within
a minute. It is the exemplar every later module copied. The module is
modules/task; this page states nothing that tree
does not.
The map
features/task in the recordWhat it promises
Entity |
|
Events |
|
Permissions |
|
Service |
|
Routes and screens
| Method | Path | Does | Authorization | Publishes |
|---|---|---|---|---|
|
|
List tasks |
|
— |
|
|
Create a task |
|
|
|
|
Read a task |
|
— |
|
|
Update a task |
|
|
|
|
Delete a task |
|
|
|
|
Assign a task |
|
|
|
|
Check a task’s SLA |
|
|
|
|
Resolve a task |
|
|
-
The first five are what
rest.Spec.Mountregisters, with soft delete. The three commands exist becauseassigneeId,slaBreached,resolvedAtandresolutionareImmutableto aPATCH: setting an assignee has to move the status and publishtask.assigned, and nothing may forge a breach. -
Screens: the generated list, detail and forms under
/admin/task/tasks, and the navigation entry "Tasks" for anyone withtask:read. Hand-written pages: none.
Authorization
| Authorization | Who passes | Routes |
|---|---|---|
|
a member of the tenant |
|
|
a member of the tenant |
|
Events, jobs and subscriptions
| Event | Published by | Handled by |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
task.sla_breachedalso comes from the sweep;HookEventsdeclares it on the create operation so the boot gate can check it. -
Jobs:
SLASweep, every minute unlessDeps.SweepEverysays otherwise, throughjobs.PerTenant, marking every task whose deadline has passed. -
Subscriptions: none, written out as a decision: a task is raised by whoever raises it.
What it needs
|
Interface |
Supplied by |
|
|
the tenant module’s |
|
|
zero, meaning a minute; a test sets it lower |
Configuration: none.
Who uses it
-
No module takes its contracts; the tests and the reference application do.
-
The admin and the native shell reach it through
httpx.Resource, not throughcontracts/.
Verification
-
go test ./modules/task/…— the fake and the real service pass one conformance suite; the internal tests cover the service and the handlers, including a breach on arrival. -
make e2esigns in, creates a task through the generated form and finds it in the list (e2e/admin-tasks.spec.ts). -
Not proven: the sweep against a live NATS fleet; the journey uses the combined role.