iz
Clone
0 watching0 forksRust567.3 KiBdbbbc05Tahinli1 month ago30 commits
iz ("Board") feature inventory
Source: /home/tahinli/Documents/Code/Rust/old_iz (read-only pass; nothing modified).
Crates: iz-core (domain, SQLite-compatible store via turso, mail engine, config, secrets, sniffing), iz-web (topcoat HTTP server, pages, handlers, SMTP client, storage client, SSE), iz-client (OIDC client for im, cookie sealing, family registration).
Tests: iz-web/tests/http.rs (227 tests), iz-core/tests/store.rs (212 tests), iz-web/tests/browser/*.mjs (4 Playwright scripts).
Method note: this inventory was produced by 11 slice reads. Where two slices disagreed, the disagreement is listed in section 9. Items marked (unverified) were not confirmed against a second source.
1. Purpose summary
- iz is a single-workspace board/task tracker: columns (statuses), cards (tasks) with one level of subtasks, dependencies, assignees, comments, deadlines and clock times, and a per-task activity trail.
- Access is by sign-in through the sibling identity provider im (OIDC, RS256 id_token, per-request token introspection). Roles are Admin, Member, Viewer.
- Outbound mail only: per-workspace SMTP sender; admin-defined mail rules that fire on board events; invites, notices and clock reminders; a durable outbox with retries, batching and a decision ledger. There is no inbound SMTP server and no reply-by-mail.
- Attachments live on the local disk or, optionally, in the sibling Files service "in" (bearer-token service API). Upload type is decided by sniffing bytes, not by the browser.
- Admin screens: members/roles, sender, limits, storage backend, mail rules, outbox/logs, tags (projects), app public address, admin-to-member messages.
2. User-facing features (grouped)
Notation: [role] is the minimum role the code checks. Routes are method + path. Forms POST and answer 303 to the Referer path with ?refusal=<code>&on=<call> on refusal. "Redirect target" for most forms is the originating page.
2.1 Sign-in, session, profile
- Sign-in:
GET /auth/login?next=(iz-client). Sets the PKCE flight cookie, redirects to im/authorize.nextmust start with/, not//, no\, no control chars. GET /auth/callback: validates state (constant-time), exchanges code at im/token, validates id_token, checks nonce, requiresapp_session, introspects it, setsiz_session. On error redirects to/?auth_error=<code>(codes: invalid_request, invalid_state, exchange_failed, or im's own error string).GET /auth/logout: clearsiz_session, redirects to im/logout?back=<public address>. There is NO sign-out control in the UI (the menu has only Profile and Settings); users must type the URL (unexpected gap).- Every request calls
iz_client::current_user(no local validity window): opens the sealed cookie, checks cookie exp, then POST im/introspect.active:falseclears the cookie. A transport failure returns signed-out but keeps the cookie. On an active answer,store.provision_user(sub, email, name, admin)runs. - Provisioning: first sign-in creates the workspace, the board, four columns, the default tag. Admin flag from im makes role Admin; first admin claims workspace_owner (once). Matching by email (case-insensitive) claims a legacy/invited row (keeps id, role, prefs). Every sign-in sets last_signed_in_at.
- Disabled account reads as signed out (
/api/mereturns 401). GET /api/me[any session]: 204 when signed in, 401 otherwise.- Profile / preferences (Settings > Profile)
[any user]:POST /api/save_profilewiththeme(light|dark),language(en|tr),ui(instrument|ledger). Refusals BadTheme, BadLanguage, BadUi. Timezone is stored (user.timezone) and set through im sync, not editable on this page. - User menu: display name, email, role label; links Profile (to im
{issuer}/, data-hard) and Settings. - Signed-out landing (
GET /when no session): sign-in card linking/auth/login;?auth_error=shows a sign-in-failed line. English only.
2.2 Board (home /)
GET /[any signed-in]: board page. Signed-out shows sign-in card. Store error shows "something went wrong" with HTTP 200.- Columns (
board_column) ordered by position; a column withis_done=1is the finished column. Column names are translated for display only for the four seeded names (Backlog, In Progress, Review, Done) in Turkish; custom names pass through. - Cards (
taskrows with no parent): key (<PREFIX>-<tail>), title, deadline line, project chip (non-default tags only), subtask countdone/total, comment count, blocked/blocks key chips, assignee avatars. Done cards greyed. Blocked = not done and has an uncleared blocker. - Card context menu: Open; Move (submenu, one per other column; writers only); Delete (link to
?task=<id>&confirm=delete, writers only). - Drag and drop: writers only. Drop on
.column-cardsposts/api/move_card. Dropping in the same column is a server no-op. - Filter bar (GET
/, auto-submit): project (tag), assignee (assigned: all /none= Nobody / member id), sort (sort: deadline default, created (newest first by ULID), title), search (q, live, debounced 200 ms). Search matches task_key and title only (Turkish-aware folding), not description, tags or assignees. A bogus tag or assignee id falls back to no filter. - Chips: overdue count, blocked count (shown when > 0).
- Empty states: "no matches" when search filtered to nothing; empty columns show "no tasks".
- New task:
GET /?new=1(writers only) opens modal;POST /api/create_task[writer]: title (required, non-empty), column_id, description, deadline (YYYY-MM-DD), clock_hour/clock_minute (see clock rules), tag_id (default if absent), repeated assignee_id, a link (other_id + direction blocked_by|blocks; missing/unknown direction defaults to blocked_by). Redirects to/. Note: a dependency cycle refusal happens AFTER the card is inserted, so the card survives the refusal (bug, see section 9). - Move:
POST /api/move_card[writer]: task_id, from_column_id, to_column_id. Outcomes: Recorded (writes transition, fires status rules), Unchanged (no-op), Stale (refused MovedAlready: someone else moved it), Held (refused SubtasksOpen: cannot enter a done column while subtasks are open; no override). Target column must be on the task's board (else Forbidden). - Board query may open
?task=<id>(task modal) or?new=1; both never open together (task wins).?file=opens the in-modal file viewer;?sheet=/?rows=/?cols=drive spreadsheet paging;?sheet=is reused as slide index for decks.
2.3 Task detail (modal on /?task=<id>)
- Opened by
?task=<id>; deep-linkable. Server-rendered snapshot (load_snapshot): detail, role flags, tags, timezone, linkable tasks, adoptable tasks, notifications, allowed types, attachment limit. - Tabs (
tab=):task(default),subtasks(hidden on subtasks; shows done/total),files(count),comments(count),activity,mail(notifications). Unknown tab falls back to task. - Masthead: breadcrumb to parent (subtasks), inline title edit
[writer], status select[writer](posts move_card; viewer sees label), Esc / close link. - Task tab fields:
- Status (see move_card).
- Project/tag:
POST /api/set_task_tag[writer]. Tag must belong to this board. Writes activity kindtagged; deliberately does NOT mail. - Deadline: day picker (
YYYY-MM-DD, Clear, Today) plus clock hour (00-23) and minute (00-59), blank "--" option. Clock needs a day; clearing the day with clock set... (clock is kept or cleared per rules below). - Assignees:
POST /api/assign[writer](repeated user_id; multi-select; partially applied on first NotFound/Forbidden, no transaction);POST /api/unassign[writer]. Only roles that can be assigned (Admin, Member) are offered. - Dependencies (blocked_by / blocks):
POST /api/link_tasksandPOST /api/unlink_tasks[writer]; direction is a serde enum (unknown value = deserialize failure). Unlink is a soft clear (cleared_at). Cycle refused (Cycle). Self-link not rejected in the handler (relies on store). - Description: inline edit,
POST /api/save_task[writer](title required; description free text; absent field keeps old value; blank deadline/clock clears).
- Subtasks tab
[writer]to create/adopt:POST /api/create_subtask(parent_id, title trimmed non-empty; HTML maxlength 200; lands in lowest-position column (unverified detail)).POST /api/set_parent(task_id, parent_id; empty parent_id = release/promote).- One level only: NotNestable. A parent with open children cannot itself become a part.
- Files tab: upload (see 2.7), per-file delete (
POST /api/delete_file[uploader or admin]), file chips link to in-modal viewer (for renderable types) or/files/<id>?v=download. - Comments tab: list (author link to profile, time in viewer zone, plain text), composer
POST /api/post_comment[can_comment]: body trimmed non-empty. Viewer cannot comment. No edit, no delete, no @mentions. - Activity tab: task-scoped activity lines (sentences).
- Mail tab (notifications): last 10 rule decisions for this task and last 50 sends for this task. Rule name and send error text are admin-only. Send states: Pending, Held (failed with 0 attempts), Failed, Sent, Abandoned.
- Delete:
POST /api/delete_task[writer]is a SOFT delete (deleted_at) of the task and its direct children (grandchildren not touched). Confirmation shows comments going with it, subtasks going with it, dependencies that stop applying, and cards that stop being blocked. Redirects to/. No undo. Delete-freed tasks get mailed via "unblocked" rules. POST /api/fetch_task(JSON snapshot) andPOST /api/what_delete_costs(JSON deletion cost): exist, no UI caller in these files.
2.4 Clock and deadline rules
- Deadline: a day (
YYYY-MM-DD). Overdue rule (one rule everywhere): done is never overdue; with a clock, overdue when clock <= now; day-only overdue when day strictly before today. - Clock (meeting time): stored as an exact UTC instant. Entered as H:MM 24-hour in the user's timezone (fixed offset from
parse_zone; no DST). Rules: time needs a day (BadClock otherwise); both hour and minute or neither; blank both = clear; setting a clock overwrites the deadline day with the clock's day. - Reminders: clock reminders go to each assignee
reminder_minutesbefore the meeting (workspace setting, default 15; 0 = off). Reminders are re-derived on any change to clock, done state, deletion, assignees. Clock in past = no reminder. Reminder mail subjectReminder: <title> (<key>), body states meeting time in the recipient's own zone.
2.5 Tags (projects)
- Each board has tags; every task wears exactly one. A default tag "General" (is_default=1) exists per board; new tasks wear it when no tag is chosen.
GET /tags[admin](non-admin sees a refusal note in English).?edit=<id>renders rename form.POST /api/create_tag[admin]name (trimmed, non-empty; duplicate name per board = generic error).POST /api/rename_tag[admin].POST /api/delete_tag[admin]: refused for the default tag (store) and for any tag with live cards (tag_in_use); soft-deleted tasks are re-pointed to the default tag, then the tag row is hard-deleted.POST /api/move_tag[admin]direction up|down (swap with neighbour; silent no-op when no neighbour at exact position; positions can have gaps after delete, so move can silently do nothing).- No colours, no merge, no tag-level permissions. Tag name length: UI maxlength 60, not enforced server-side.
- Tag events logged as
tag_created,tag_renamed,tag_deleted,tag_moved(activity kinds via Other). - Board filter by project:
?tag=<id>.
2.6 Members, roles, people
- Member list in Settings > Members
[admin]: role select (member | viewer; autosubmit), disable/enable, add-member form. POST /api/set_role[admin]: user_id, role. Accepts member and viewer; handler refuses Admin (store accepts Admin via set_role; see section 9); refuses self and owner. Demoting to Viewer removes all of that user's assignments (and re-derives their reminders).POST /api/set_disabled[admin]: user_id, disabled (absent = true; "", 0, false, no, off = false). Refuses self. Does not check target is in workspace (store scopes; unverified). Disabling publishes revoked to that user's open streams.POST /api/add_member[admin]: display_name (required after trim, HTML maxlength 200), email (validated; HTML maxlength 320), role (member|viewer; Admin refused; duplicate address = AlreadyMember). Stores UNTRIMMED name and email (bug). Member row is unclaimed until first sign-in; invite mail is queued (kind invite) when sender is connected.- Membership sync from im: roster pass every 5 min plus live stream (section 3.2).
- People profile
GET /people/{user_id}[any signed-in, same workspace]: avatar, name, role chip, owner chip, email, joined day (viewer zone), last seen (never signed in = invited), counts (assigned open, assigned done, created, comments), last 8 activity lines authored by that person. Edit link to Settings > Profile only on own profile. Unknown or cross-workspace = 404. - Avatars:
GET /avatar/{user_id}[any signed-in]proxies the im photo (directory.photo(sub)). Anonymous 401, unknown/unlinked/im-failure 404 (empty body; initials shown). ETag"p<photo_version>"; with matching?v==private, max-age=31536000, immutable; otherwiseprivate, no-cache;If-None-Matchmatch = 304. No server cache; passes bytes through. KNOWN GAP: no workspace check (any signed-in user of any workspace can fetch another user's photo if they know the id).
2.7 Files and attachments
- Upload:
POST /files[can_comment]multipart: task_id (must come before file parts), optional comment_id (kept only if on same task), repeated file parts. Redirects to/?task=<id>&tab=files, refusals asrefusal=<code>&on=upload_file. - Limits:
workspace.attachment_limit_bytes(default 25 MiB) enforced while streaming (refusal FileTooBig). Server body cap at/files= 500 MiB (WIDEST_ATTACHMENT_MB). Read errors while streaming are also reported as FileTooBig (misleading). - Types:
workspace.allowed_file_types(empty = all). Matching is the lowercased extension after the last dot against the stored list, exact. Files with no extension refused when the list is non-empty. - Stored MIME = sniffed from bytes (
iz_core::store::sniff), never the browser's type. Sniffer yields png, jpeg, gif, avif, heic, webp, pdf, zip, xlsx, ods, pptx, xls, OLE (x-ole-storage), gzip, quicktime, mp4 (any other ftyp brand), webm, wav, flac, ogg, mpeg, text/plain (any valid UTF-8), octet-stream. Never svg or html. - Sniffing runs inline up to 8 MiB, otherwise on spawn_blocking.
- Activity
FileAddedonly when stored and not attached to a comment. - Download:
GET /files/{id}[any signed-in, same workspace]. Not found or other workspace = 404 empty body. Auth failure redirects withon=upload_file(wrong tag, bug). Local bytes read; stored bytes fetched from in (unreachable = 503 plain text). Whole file buffered in memory for both backends (even for ranges).- Headers: Content-Type = stored MIME; Content-Disposition inline only if renders inline (image except heic, video, audio, pdf, text/plain) and not
?dl=1; otherwise attachment. filename and filename* UTF-8. Accept-Ranges bytes; single range only (multi-range = full 200); unsatisfiable = 416; Cache-Controlprivate, max-age=31536000, immutable.
- Headers: Content-Type = stored MIME; Content-Disposition inline only if renders inline (image except heic, video, audio, pdf, text/plain) and not
- In-modal viewer (
?file=<id>) for viewer kinds: image, video, audio (custom player), pdf (with Present/fullscreen), sheet (xlsx/xls/ods; paged, 50 rows x 12 cols, sheet tabs), slides (pptx outline: title paragraphs as headings, text only, no notes/images)..ppt(binary) and heic have no viewer. - Spreadsheet reader: values only (no formulas/formatting/charts). Streamed for xlsx; whole-workbook for others (xls/xlsb/ods). Known offset bug in the non-xlsx path (rows/cols misaligned if used range does not start at A1).
- Accept attribute on the file input is derived from allowed types (known extensions mapped to MIME; unknown kept as
.ext). - Deleting an attachment:
POST /api/delete_file[uploader or admin], hard delete; for stored rows, remote bytes are removed first (failure refuses StorageUnavailable and keeps the row). ActivityFileRemoved(failure ignored).
2.8 Sheet and slides viewers
- Sheet and slides are NOT task views; they are the in-modal file viewers described in 2.7. No editing, no export.
2.9 Mail rules (Admin)
GET /rules[admin]: list rendered as sentences ("When status becomes [col] send [subject] to [audience]"), enabled switch, stamp (last sent / last fired / never fired), edit link?edit=<id>, delete. Note when no sender is connected (links to /settings).POST /api/create_rule[admin]: trigger, column_id, subject (required, trimmed; HTML maxlength 120; no server length check), audience (assignees | board | creator), include_task_details (checkbox).POST /api/update_rule[admin],POST /api/set_rule_enabled[admin](enabled == "true"),POST /api/delete_rule[admin](ledger kept per data model; cascade on mail_send/mail_decision via FK per store).POST /api/current_rules[admin]: JSON snapshot (doc says test-only; shipped).- Triggers (12): status (optional column; no column = any column), unblocked (a delete frees a dependent), created, assigned, unassigned, commented, deadline_set (also clock set), deadline_cleared (also clock cleared), retitled, linked, unlinked, deleted.
- Audiences: assignees (for Assigned/Unassigned: only the person just assigned/removed), board (every non-Viewer on the workspace, including the actor), creator (task creator, non-Viewer).
- Action: exactly one: send mail (subject from rule, body generated in Rust, English only; optional task details block with Key/Title/Column/Deadline/Assignees).
- Non-status trigger with a column: refused Forbidden (
trigger_of). Editing a non-status rule always fails and editing an any-column status rule narrows it, because the form pre-selects the first column (bug, section 9). - Viewers never receive rule mail (excluded in store). The actor is NOT removed from audiences (the module doc in mod.rs claims otherwise; stale).
- Mail rules fire after commit (see section 5). Loop protection is structural only: trigger set is closed and mail-related activity kinds match no trigger.
2.10 Logs and outbox (Admin)
GET /logs[admin], sections via?section=:- queue: outbox rows (pending and failed) with recipient, subject, state (held / failed / pending / sent / abandoned), attempts, last error, next attempt. Failed and abandoned rows have Retry.
- decisions: rule verdicts grouped by event and task, with outcome chip (owed, already_owed, no_recipients, not_matched, disabled, task_gone) and detail.
- activity: workspace-wide activity feed, newest first.
- Activity filters: actor (
systemor member id), kind (from constant ACTIVITY_KINDS, which omits parented, unparented, reminded, password_reset_*), task key (uppercased), day range (from/to in admin zone, to inclusive), oldest-first toggle (dir). - Keyset pagination with cursor
<RFC3339>~<id>(before=,after=); default 50 rows; page size overridable by cookieiz_rows_<section>(10 to 200), set by a small script measuring viewport. POST /api/retry_send[admin]: send_id; requeues failed/abandoned (ignores result; always logs send_retried and redirects to/logs?section=queue).- No retention or pruning code exists (ledger and activity grow without limit).
2.11 Settings (all users; sections vary by role)
GET /settings?section=(profilefor everyone;outgoing,limits,server,members,messageadmin-only, falling back to profile for non-admins; storage card sits under limits).- Profile (all): identity, theme/ui/language, Connection card (issuer, client id, live stream state, last event age, last pass age). Client id and issuer are read from config (read-only on page).
- Outgoing sender
[admin]POST /api/save_sender: host (required; no whitespace, @, or /), port (1-65535, default 587), username (required), password (required first time; blank keeps stored; cannot be cleared), from name (optional), from address (required, simple address check), workspace public_url (http/https origin, trailing slashes trimmed, empty clears). Save writes sender then public_url (not atomic; second failure shows Unavailable after sender saved). Save spawns a background connection check (15 s).POST /api/check_sender[admin]: connection handshake only (sends nothing; logs sender_checked).POST /api/send_test_mail[admin]: sends a test mail to the admin's own address; requires password and host (logs test_mail_sent). No rate limit.- Connection chip: Not configured / Unchecked / Connected (time) / Refused (server words).
- Limits
[admin]POST /api/save_limits: attachment_limit_mb (1-500), allowed_file_types (comma/space/newline; lowercased; leading dots stripped; alphanumeric; max 12 chars each; dedupe; empty = all), mail_batch_minutes (0-120), reminder_minutes (u32; server has NO upper bound; UI min 0). - Storage
[admin]POST /api/save_storagebackend = local | in.inrequires[storage.in] tokenin config and a family service with keyin; otherwise refused (StorageNotConfigured / StorageNotListed). Card shows service name/URL, connection, usage (used / quota), migration progress (in mode, when local attachments remain), last problem. Note: save_storage does not map to a section in section_of_call (lands on profile). - Server
[admin]POST /api/save_public_url: app-level public address (PUBLIC_URL_KEYsetting; read per sign-out; fallback base_url then listen address). - Members
[admin](2.6). Message[admin]POST /api/send_message: to = everyone (all members except the admin) or one member id (may be self); subject required (HTML 200, no server check); body required (no limit). Each recipient gets a notice (kind notice) queued in the outbox; logs message_sent with subject. - Settings writes that are logged as activity: limits_saved, sender_saved, sender_checked, test_mail_sent, profile_saved, role_changed, message_sent, rule_*, send_retried.
2.12 Live updates
GET /api/live[any signed-in]: SSE. One connection per tab. 401 if not signed in. Lifetime =live_seconds(default 300) then the stream ends and the client reconnects (re-auth point; admin status is fixed at connect time).- Frames:
{"topic": "<kind>", "id": "<task id if any>", "seq": <u64>}; no SSE event name. Lag gives{"topic":"resync"}(client re-reads). Own-account revoke sendsrevokedthen ends the stream. - Visibility by topic: Board, Task(id), Members, Tags: all readers. Revoked(id): only to that account. Queue, Rules, Settings, Activity: admins only (non-admins never receive the frame).
- Client: opens EventSource once per tab; schedules a morph refresh 200 ms after a relevant frame; revoked redirects to
/; error triggers/api/meprobe; 60 s interval refreshes[data-tick]elements (deadline labels over midnight).
2.13 Health and family switcher
GET /healthz(no auth):200 ok <commit sha>(IZ_BUILD_SHA). Liveness only; checks no DB, storage or im. The deploy script compares the sha.- Family switcher (header monogram): reads family list (setting
family, mirrored from im/family), excludes self (keyiz), probes each siblingGET {url}/healthz(2 s timeout, 30 s cache) and shows an on/off dot. Shown only when a family is configured.
2.14 Internationalisation
- Languages: English (default; unknown codes fall back to English) and Turkish. Per-user
language. Signed-out and error pages are fixed English. - 332 message keys; both languages covered by exhaustive match (compile-time check). Mail bodies from iz-core are English only, and the store's activity sentences are rendered in the viewer's language by iz-web.
column_nametranslates the four seeded column names only.- Turkish search folding for card search and tag/assignee filters.
2.15 Visual themes
data-ui:instrument(default, dense, cool neutral, 44 px chrome strip, ruled columns, LED-style chips) andledger(warm paper, serif display face Newsreader, mono uppercase keys/dates, hairline rules). Each has light and dark token sets; dark is per user.- Fonts: IBM Plex Mono and Newsreader from Google Fonts on every page (third-party request).
3. Cross-app contracts
3.1 im (identity provider, OIDC + extensions)
Config ([oidc] table in config/iz.toml): issuer (required, non-blank; no URL check), client_id (required), client_secret (required; never printed), redirect_uri (optional; default <listen_url>/auth/callback; explicit value not validated).
Endpoints (hard-coded paths relative to issuer; no discovery; issuer must not end with /):
| Purpose | Request | Auth | Response used |
|---|---|---|---|
| Authorize | browser 303 {issuer}/authorize?response_type=code&client_id&redirect_uri&scope=openid profile email&state&nonce&code_challenge&code_challenge_method=S256 |
— | — |
| Token | POST {issuer}/token form: grant_type=authorization_code, code, redirect_uri, client_id, client_secret, code_verifier |
creds in body | JSON {id_token, app_session?}; app_session is im-specific; absent = not a current im |
| JWKS | GET {issuer}/jwks.json |
none | keys[] kid, n, e (RSA) |
| Introspect | POST {issuer}/introspect form: token, client_id, client_secret |
creds in body | active (bool, required), sub, email, name, exp (i64), admin (bool, optional) |
| Logout | browser 303 {issuer}/logout?back=<public address> |
— | — |
| Family list | GET {issuer}/family |
HTTP Basic client_id:client_secret | JSON array of {key, name, url} |
| Family register | POST {issuer}/family/register JSON {key:"iz", name:"Board", url:<origin>} |
HTTP Basic | 2xx = filed; error body {error, reason}; 409 "owned" when key held by another app |
| Directory roster | GET via im-client crate (git rev 2043642), Basic auth; path not visible in this repo | Basic | member records |
| Directory photo | via im-client directory.photo(sub) -> (bytes, mime) |
Basic | image bytes |
| Directory live stream | GET {issuer}/directory/live, SSE, held open with no timeout |
Basic | frames: default/profile = StreamMember {sub,email,name,admin,photo_version,timezone,disabled}; revoked = {sub}; other kinds ignored |
Auth details:
- PKCE S256: verifier 32 random bytes base64url; state and nonce 16 bytes.
- id_token: RS256 only; kid required; JWKS cached 3600 s and refetched once on unknown kid; iss exact match; aud must be a string equal to client_id; exp > now. nonce checked in exchange. No iat/nbf/azp/kty/alg/use checks. Identity served comes from introspection, not id_token claims.
- Per-request introspection is the revocation mechanism (
active:false). Session cookie exp is set from the introspected exp at login and never refreshed; introspected exp discarded on later requests. - Two auth styles are required by im: form-body creds for token/introspect; Basic for family and directory.
- Family beat: every 5 min: roster pass, register family (origin = stored public address, else base_url; skipped with a log line if empty), fetch family and store JSON under setting
family. Failures keep the previous list. - Roster pass via
sync_memberalso updates photo_version and timezone; a stream frame with disabled toggles user disabled. - directory_stream: full roster pass then stream; reconnect backoff 1 s doubling to 30 s; each reconnect repeats the full pass.
3.2 in (Files service, attachments)
Enabled only when [storage.in] token is set (bearer token minted for iz). Service URL is read per call from the family row with key in (name and url), raw (no trailing-slash trim; a trailing slash yields // paths). Without a token, every call is refused before the wire.
| Call | Request | Auth | Success / body |
|---|---|---|---|
| probe | GET {url}/healthz |
none | any 2xx |
| status | GET {url}/api/service/status |
Bearer | JSON {quota_bytes, used_bytes} (u64, default 0) |
| put | POST {url}/api/service/files multipart: text external_id (= iz attachment id), text name, part file (mime = stored mime) |
Bearer | JSON {"ok": "<file id>"}; {"err":"QuotaExceeded"} = quota; other err string; no status check before parse; idempotent by external_id |
| fetch | GET {url}/api/service/file/{external_id} |
Bearer | 2xx bytes |
| delete | DELETE {url}/api/service/file/{external_id} |
Bearer | 2xx |
Timeouts: connect 5 s, read-silence 10 s, total 10 s for status/probe/delete; put and fetch have no total ceiling (builder failure silently drops all timeouts).
Storage beat every 30 s: probe, status (updates Settings card facts), then if backend in and local attachments exist, drains up to 4 per beat (put, mark stored, remove local file). A put that landed but whose local mark failed is re-pushed next beat (idempotent).
Upload to in: put, then add_remote_attachment (row remote_state stored); if the DB write fails, best-effort delete remote (a leaked remote file is possible if delete also fails).
Problem words: unreachable, quota, status, store, unlisted (last_problem not cleared on success; known stale-display bug).
3.3 iz-client (what it exposes)
Config { issuer, client_id, client_secret, redirect_uri, logout_back, cookie_name, cookie_key [u8;32] }(no Debug).IzClient::new(config),family()-> Option<Vec>,register_family(key,name,url)-> Result<(), String> (only method with String error; inconsistent).FamilyService { key, name, url },User { sub, email, name, admin },Error { Http, Refused, Token }.mount(builder, config)registers IzClient as app context and routes/auth/login,/auth/callback,/auth/logout(and/whoamiunder test only).current_user(cx).- Feature
test-seam:mint_session_cookie,introspect_path. Examplemint(requires test-seam): seals a Session cookie for test harnesses (key file must be 32 raw bytes). - Cookies:
iz_session(sealed session, HttpOnly, SameSite=Lax, Path=/, Secure iff issuer is https, MaxAge 30 days); flight cookieiz_session_pkce(10 min). Sealing: XChaCha20-Poly1305 with 32-byte key from<db dir>/iz.key; no AAD or purpose tag; base64url payload. - Doc claims refresh tokens and silent rotation: code has none (stale doc).
4. Data model
All ids are ULID text. Timestamps are RFC 3339 UTC text (iz-core writes 9 fractional digits for text ordering; boot canonicalises legacy stamps). Deadlines are YYYY-MM-DD text. Booleans are INTEGER 0/1. Source: crates/iz-core/migrations/0001..0007 (0001_init.sql is 457 lines per wc).
Tables (final shape after 0007):
- workspace: id PK; name; created_at; attachment_limit_bytes INTEGER DEFAULT 26214400 (25 MiB); allowed_file_types TEXT JSON array DEFAULT '[]' (empty = any); mail_batch_minutes INTEGER DEFAULT 5 (0 = send at once); reminder_minutes INTEGER DEFAULT 15 (0 = off); smtp_host, smtp_port, smtp_username, smtp_password (sealed
v1:ciphertext), smtp_from_name, smtp_from_address; smtp_test_at/ms/error (result of real test mail); smtp_check_at/ms/error (result of handshake; cleared on sender edit); public_url (mail link base). - user: id PK; workspace_id REF; oidc_sub (unique where not null; claimed on first sign-in by email); email; display_name; role TEXT (admin|member|viewer; no CHECK); disabled DEFAULT 0; timezone DEFAULT 'UTC' (sync'd from im; app shows fixed offsets); theme DEFAULT 'light'; language DEFAULT 'en'; ui DEFAULT 'instrument'; created_at; last_signed_in_at; photo_version DEFAULT 0 (avatar cache stamp from im).
- workspace_owner: singleton PK (one row); user_id; claimed_at. First admin seen claims ownership.
- board: id; workspace_id; name; task_prefix DEFAULT 'DZ' (hard-coded in provisioning; key prefix); created_at.
- board_column: id; board_id; name; position; is_done (finished column).
- tag: id; board_id; name; position; is_default; created_at. Unique: one default per board; unique name per board.
- task: id; board_id; parent_id (self-FK; one level enforced in store); task_key (unique per board; prefix + tail of ULID, retried with longer tails on collision); title; description DEFAULT ''; column_id; tag_id (NOT NULL); deadline (day); clock_at (UTC instant); position REAL (end of column ordering); created_by; created_at; updated_at; done_at (set when moved into is_done column); deleted_at (soft delete).
- task_assignee: (task_id, user_id) PK.
- task_watcher: (task_id, user_id) PK. Table exists; no feature in these files reads or writes it (unverified).
- task_dependency: blocked_task_id; blocking_task_id; created_at; cleared_at (soft-clear; cleared = satisfied); PK (blocked, blocking); CHECK blocked != blocking.
- comment: id; task_id; author_id; body; created_at. Unbounded body; no edit/delete.
- attachment: id; task_id; comment_id (nullable); file_name (label only); mime_type (sniffed); size_bytes; uploaded_by; created_at; remote_state DEFAULT 'local' ('local' = under storage/attachments/; 'stored' = in Files service keyed by id). Note: the store comments are contradictory about 'stored' vs 'local' for files on disk (see section 9).
- transition: id; task_id; from_column (''= created into column); to_column; actor_id; created_at. One per card move.
- freeing: id; board_id; cause_key; cause_title (copied); actor_id; created_at. One per delete that unblocks someone.
- activity: id; task_id (nullable: workspace/account events); actor_id (nullable: system); subject_id (nullable: who assigned/unassigned line is about); kind (no CHECK; includes other kinds: tagged, tag_created, reminded, sender_saved, ...); detail DEFAULT ''; created_at.
- mail_rule: id; board_id; trigger_kind (open set, includes 'status'); trigger_column (nullable; only for status); subject; audience CHECK in (assignees, board, creator); enabled DEFAULT 1; include_task_details DEFAULT 0; created_at. CHECK trigger_column null unless status.
- mail_send (outbox): id; rule_id (FK cascade, nullable); event_id; task_id; recipient; state CHECK in (pending, sent, failed, abandoned); attempts DEFAULT 0; last_error; claimed_at; next_attempt_at (also the lease/due time); sent_at; kind CHECK in (rule, invite, notice, reminder) DEFAULT 'rule'; subject; body. Unique (rule_id, event_id, task_id, recipient) = "the index decides who owns a send". CHECKs tie kind to required columns.
- mail_decision (ledger): id; rule_id (FK cascade); event_id; task_id (no FK; survives deletion); outcome CHECK in (owed, already_owed, no_recipients, not_matched, disabled, task_gone); detail DEFAULT ''; created_at. Unique (rule_id, event_id, task_id).
- setting: key PK; value. Holds
family(JSON mirror of im family),public_url(app address),storage_backend(local|in).
Indexes (selection): user_email_unique (workspace_id, email); user_oidc_sub_unique; tag_one_default; tag_name_unique; tag_by_board; task_key_unique (board_id, task_key); task_by_column; task_by_parent; task_watcher_by_user; task_dependency_by_blocking; comment_by_task; attachment_by_task; transition_by_task; freeing_by_board; activity_by_task; activity_recent; activity_by_subject; mail_send_once; mail_send_owed (next_attempt_at); mail_send_by_rule; mail_send_by_task; mail_decision_once; mail_decision_recent; mail_decision_by_task. (Pre-collapse fixture has mail_rule_by_board; live schema does not.)
Dropped in 0003: session, signin_link, auth_attempt tables and password-era user columns (password_hash, invited_by, photo_mime, feed_seen_at); dropped in 0002/0003/0004: rate-limit, session-lifetime, signin-link-lifetime, photo_limit_bytes columns.
Filesystem layout: <storage>/attachments/<attachment id> (0700 dir, 0600 files), <database dir>/iz.key (32-byte key, 0600), database file plus -wal/-shm (0600). The photos/ directory is referenced in comments only (photo bytes now come from im).
Boot repairs (idempotent, each boot): retire actor-only decisions, retire Viewer assignments, seal plaintext SMTP passwords, canonicalise legacy stamps, re-sniff generic attachment MIME types (zip/octet-stream/OLE; text/plain never refined), sweep orphan files in attachments/ (unknown files deleted; missing files logged only).
5. Mail engine
Components: iz-core mail.rs (Engine), SMTP client iz-web/src/smtp.rs (lettre, outbound only), store ledger (mail_rule, mail_send, mail_decision), iz-web sweep task.
Triggering (after commit, never inside a move's transaction):
on_transitionfor card moves (status rules). Crossing into a column owes; a non-matching rule records NotMatched with detail moved::<watch|any>. A deleted task records task_gone.on_freeingfor deletes that unblock (unblocked rules). Other triggers record not_unblocked.on_activityfor all other activity kinds (created, assigned, unassigned, commented, retitled, linked, unlinked, deleted, deadline_set/cleared, clock_set/cleared). Disabled rule records Disabled.- Audience resolution: assignees (for assigned/unassigned, only the person named), board (non-Viewers in workspace, including actor), creator.
- Empty audience: decision no_recipients (detail "empty").
- Each recipient claims a send (unique key). A lost claim records already_owed; a won claim records owed.
Delivery:
- Sweep task (iz-web main.rs): sleeps until the next due time (idle cap 3600 s, re-check 60 s when a due row was not taken, wakes early on Queue topic), calls deliver_owed(now, 50). Request-side after_activity/after_invite call deliver_owed(now, 8).
- Lease: claimed rows are due again after LEASE = 5 min (crash = late send, possible duplicate; at-least-once).
- Retries: MAX_ATTEMPTS = 5 for retryable refusals; backoff = 5 * 2^(attempts-1) minutes, capped 60 (values reached: 5, 10, 20, 40; the 60 cap is unreachable because the attempt gate stops at 4 retries). Permanent refusal or 5th attempt = abandoned. Otherwise failed with next_attempt_at.
- Held (no sender configured): MailError::unsent, row defers HOLD = 1 min without spending an attempt.
- Quiet window (workspace mail_batch_minutes): rows for same (task, recipient) are grouped into one mail; hold pushes all pending never-attempted rows later, ceiling MAX_HOLD_WINDOWS = 4 windows from oldest row. Holds never pull a leased row back. Window 0 sends immediately. Invites, notices and reminders never batch.
- Batch body: "KEY — title", Column, Deadline, Assignees, when-line, link (+ details block if rule opts in). Single body includes the happened sentence.
- Subject: rule's subject (admin's text, no templates). Invite/notice/reminder carry their own subject and body.
- Body text is composed in Rust (English only); link is
<public_url or listen url>/?task=<id>. - Empty subject/body on invite/notice/reminder is sent as-is (unwrap_or_default).
Kinds: rule (from rules), invite (queued when a member is added; state pending; also "queue_invite" publishes Members), notice (admin message to members), reminder (clock reminders; per recipient; reminder sent writes an activity reminded on the task).
States: pending, sent, failed (retry scheduled), abandoned (no more retries). Decision outcomes: owed, already_owed, no_recipients, not_matched, disabled, task_gone.
Test mail and connection check: send_test(to) (subject "iz test mail", no ledger row, no retry; records sender_test). check_sender() = connect, TLS, EHLO, AUTH, NOOP, quit; sends nothing; a pass does not prove deliverability (envelope sender checked per message).
SMTP client (smtp.rs):
- No listener. Outbound only.
- Port 465 = implicit TLS (relay); any other port = STARTTLS (starttls_relay). UI default port 587.
- Timeouts: transport reply 15 s; probe 15 s whole call.
- Auth: username and password (Credentials). Transport rebuilt when sender config changes.
- From:
"<name> <address>"or bare address (name not escaped). To parsed as mailbox. Plain text, text/plain, no HTML, no attachments, no size limit set in code. - Permanent error (parse failure or SMTP permanent code) = abandoned; others retryable.
- Missing sender configuration (host, port, username, from address or password absent/empty, or port out of u16) = unsent (held).
Inbound mail: NONE. There is no SMTP server, no inbound parsing, no reply-by-mail, no sender verification for inbound.
Rule-loop protection: structural only (closed trigger set; mail-related activity kinds match no trigger).
6. Configuration
File: config/iz.toml, path relative to the working directory. No environment variables are read (HOST and PORT deliberately ignored). Missing file: development defaults are written (mode 0600) and the boot stops with "fill in [oidc]" (the "dev" report line is effectively unreachable). The committed repo ignores config/iz.toml (.gitignore); the committed config file shown has database and listen only.
| Key | Where | Required | Default | Rule |
|---|---|---|---|---|
| database | top level | yes | none | non-empty; resolved absolute; dev template uses "iz.db" |
| storage | top level string, or table [storage.in] | no | <db parent>/storage (or "storage") |
empty = default; other TOML types invalid; storage and [storage.in] together = duplicate key parse error |
| storage.in.token | [storage.in] | no | absent (in backend unavailable) | empty = absent; never printed |
| listen | top level | no | 127.0.0.1:7654 | must parse as SocketAddr; port 0 allowed; only decides bind address |
| live_seconds | top level | no | 300 | must be nonzero; SSE window |
| base_url | top level | no | empty (derive from listen) | not normalised; used as public URL fallback |
| [oidc] | table | yes | none | must exist |
| oidc.issuer | [oidc] | yes | none | non-blank; no URL validation |
| oidc.client_id | [oidc] | yes | none | non-blank |
| oidc.client_secret | [oidc] | yes | none | non-blank; never printed |
| oidc.redirect_uri | [oidc] | no | <listen_url>/auth/callback |
explicit value unvalidated |
Unknown top-level keys and unknown [oidc] keys are reported as ignored (not fatal). Startup report prints database, storage, mail URL, oidc issuer, sender pointer, ignored keys (no secrets). Config is completed on load: missing optional keys (listen, live_seconds, base_url, storage) are appended (only adds).
Runtime settings (not in file; in DB, admin-edited): sender (smtp_*), attachment limit, allowed types, mail batch minutes (default 5 in DB; 0 when no workspace yet), reminder minutes (default 15), public URL (workspace and app-level), storage backend (default local), family mirror.
Build-time: IZ_BUILD_SHA (default "dev"), IZ_STYLE_FINGERPRINT (stylesheet hash guard).
Boot-time constants: LEASE 5 min; HOLD 1 min; MAX_ATTEMPTS 5; MAX_HOLD_WINDOWS 4; DIRECTORY_SECONDS 300; STORAGE_SECONDS 30; DRAIN_BATCH 4; WIDEST_ATTACHMENT_MB 500; ROWS_PER_PAGE 50 (sheet), COLUMNS_PER_PAGE 12; PROBE timeout 2 s (family), 15 s (sender check); storage connect 5 s / read 10 s; directory backoff 1 s to 30 s; busy_timeout 5000 ms; broadcast capacity 256; live cookie-rows default 50 (10-200).
CI/deploy: GitHub Actions deploys main to a host over SSH as a systemd user unit (iz.service, WorkingDirectory ~/iz, ExecStart ~/iz/current/iz-web, Restart=on-failure). Health gate on /healthz (must be ok <sha>) and served stylesheet hash; automatic rollback to current.previous.
7. Security mechanisms
Authentication:
- OIDC with PKCE S256; state and nonce; id_token RS256 + iss + aud + exp; per-request introspection; revocation =
active:falseonly. - Sealed cookies: XChaCha20-Poly1305, key in iz.key beside the DB (lost key = signed out and SMTP password unreadable).
- Cookie flags: HttpOnly, SameSite=Lax, Path=/, Secure iff issuer is https.
- Sign-in return path whitelisted (safe_next).
- Redirects built from Referer are reduced to same-origin path (no open redirect), though the raw Referer is used in some board redirects.
Authorisation (role matrix; from role.rs and handler guards):
| Capability | Admin | Member | Viewer |
|---|---|---|---|
| Read board, task, files, people, avatars | yes | yes | yes |
| Create/move/edit/delete tasks, subtasks, links, assign, tag a task | yes | yes | no |
| Be assigned, be mailed (rules, reminders) | yes | yes | no |
| Comment | yes | yes | no |
| Upload file | yes | yes (can_comment) | no |
| Delete a file | uploader or admin | uploader | no |
| Administer: members, roles, sender, limits, storage, rules, logs, tags, messages, app public address | yes | no | no |
| Live channel admin topics (queue, rules, settings, activity) | yes | no | no |
| Profile / preferences | yes | yes | yes |
| Export: not gated (no export feature found). | |||
| Non-admin hitting admin page gets a refusal note (page) or Forbidden (POST). Not-found and cross-workspace both return 404-like "not found" (not forbidden) for tasks, files, profiles. |
CSRF: NO token and NO Origin/Referer check. Only SameSite=Lax on the session cookie stands between a cross-site POST and an action (weak; see section 9).
Headers: no CSP, X-Frame-Options, nosniff, HSTS, Referrer-Policy, Permissions-Policy. Inline scripts used throughout. Google Fonts loaded from third party on every page. Only Cache-Control no-cache on HTML.
Secrets:
- SMTP password: write-only in UI, sealed in DB (XChaCha20-Poly1305,
v1:prefix); never in logs or pages; lost key = "no password set". - OIDC client secret: never rendered; used only for Basic and form auth.
- Storage bearer token: presence-checked on the page; never printed.
- Config secrets never printed by the startup report.
- Key file written with default umask then chmod 0600 (brief window; unix only).
Input and limits:
- Upload: 25 MiB default workspace limit (up to 500 MiB), allow-list by extension, bytes sniffed, streamed with per-chunk limit; body cap 500 MiB at /files.
- Download: inline only for safe families; attachment otherwise; nosniff absent.
- Sheet and slide parsing run on spawn_blocking; no zip-bomb limit in slides reader.
- Avatar and file streams have no rate limit; no rate limiting anywhere.
- Live stream: admin topics filtered by role snapshot at connect time.
Other:
- Viewers excluded from all mail recipients in store queries.
- Disabled accounts cannot sign in (introspection/
disabledcheck) and are revoked live. - Activity log records admin actions and mail verdicts; message bodies and credentials not logged.
8. UI: pages and what each shows
| Page | Path | Who | Shows |
|---|---|---|---|
| Sign-in (landing, signed out) | / |
anyone | Wordmark, sign-in link, auth error line |
| Board | / |
signed in | Topbar (nav, family switcher, user menu), filter bar (project, assignee, sort, search, overdue/blocked chips, new task), columns of cards, card menus, task modal and new-task modal when open |
| Task modal | /?task=<id> |
signed in | Masthead (breadcrumb, title, status, close); tabs Task / Subtasks / Files / Comments / Activity / Mail; delete confirmation; in-modal file viewer |
| New task modal | /?new=1 |
writers | Title, column, description, deadline and clock, project, assignees, link |
| File viewer | /?task=..&file=.. |
signed in | Image, video, audio, PDF (present), spreadsheet (paged table, sheet tabs), slides outline |
| Profile (person) | /people/<id> |
signed in, same workspace | Avatar, name, role, owner chip, email, joined, last seen, counts, recent activity |
| Settings | /settings |
signed in | Sections: Profile (identity, theme, ui, language, connection), Outgoing (admin: sender, check, test), Limits (admin: attachments, types, batch, reminders, storage), Server (admin: app public address), Members (admin: roles, disable, add), Message (admin: send notice to one or everyone) |
| Mail rules | /rules |
admin | Rule sentences, enable switch, last sent/fired stamp, edit form, delete; note if no sender |
| Logs | /logs |
admin | Sections queue / decisions / activity; filters; pagination; retry |
| Tags | /tags |
admin | New tag form; ordered tag list with card counts, rename, move up/down, delete (disabled for default and in-use tags) |
| Avatars | /avatar/<id> |
signed in | Image (not a page) |
| Errors | any | any | "nothing at this address" 404 page (signed-out pages in English) |
| Healthz | /healthz |
any | plain text ok <sha> |
Client-side behaviour: soft navigation (swap body in place, no reload, build-stamp skew reloads once), escape-key priority manager, custom dropdown replacing selects (search when more than 7 options), datepicker popover, card context menu, drag-and-drop card move and file drop zones, live refresh on SSE frames, avatar fallback to initials, audio and PDF helpers.
9. Oddities, bugs, half-finished and inconsistent items
Security:
- Avatar cross-workspace leak:
avatar.rsfetches any user by id with no workspace comparison (store.user(id)is unscoped). Any signed-in user of any workspace can fetch another user's photo if they know the id. Fix: compare workspace_id with viewer. - No CSRF token and no Origin/Referer check on any POST; SameSite=Lax only.
- No CSP or other security headers; inline scripts everywhere; third-party Google Fonts on every page.
- Download auth failure redirects with
on=upload_file(wrong refusal tag). - Upload: read error on a file stream is reported as FileTooBig.
- Storage client: stale
last_problemshown after recovery (never cleared on success). - Storage client builder failure silently drops all timeouts.
in_ofuses family URL raw (trailing slash gives//paths).- set_disabled checks only that target != self; workspace scoping and owner protection rely on store (unverified). set_role in store accepts Admin; handler refuses it, so the Admin refusal exists only at the handler and in add_member.
- Secret key file created with default permissions, then chmod 0600 (window). Non-unix: no restriction.
- Downloads and avatars: no rate limiting anywhere.
qsdecode/decode_qslice multibyte text at%; can panic on malformed escapes (low impact).- Retry endpoint and check_sender have no rate limit; check_sender refusal not shown on the page.
Data and logic:
14. Reminders go to disabled assignees (recipient query has no disabled filter).
15. Position MAX for new cards includes soft-deleted and done tasks (bug-prone).
16. create_task: column_id not validated against board in store; card is inserted before dependency cycle check, so a cycle refusal leaves a card behind. Same non-atomic risk for assign loops.
17. add_dependency: parent/child check is outside the transaction (race). Dependency edges to soft-deleted blockers still show on the board (dependencies_for_board does not filter blocker deleted_at).
18. Subtask deep nesting not prevented in delete (grandchildren not deleted; orphans possible if nesting ever existed); reminders for deleted subtasks may linger (verify).
19. move_tag can silently do nothing after gaps from delete_tag (no renumbering).
20. Silent no-op updates on wrong workspace id: set_limits, set_public_url, set_setting, set_storage_backend, record_sender_* do not check row count.
21. Rule editing: non-status rule cannot be created unless column select is "Any column" (trigger_of returns Forbidden); editing a non-status rule always fails; editing "any column" status rule narrows it to the first column (form pre-selects first column).
22. Mail actor is not removed from audiences, so people get mail about their own actions (mod.rs doc claims otherwise; stale).
23. Mail backoff cap of 60 min unreachable (attempt gate).
24. Endless re-claim: a send whose rule or event row is missing, or with no task, is never attempted or written off; it is re-claimed every lease pass.
25. Unblocked crossing into a non-done column writes no decision (promise broken).
26. Reconcile (rebuild after schema change) forces user.disabled = 0 for every row (reconcile.rs map), so disabled accounts become enabled after a rebuild. Real bug candidate.
27. Reconcile swap is two renames; a crash between leaves no file at path (only in-process recovery). Every rebuild leaves a full backup file that is never deleted.
28. Mail batch default: DB default 5 minutes vs engine 0 when no workspace row exists.
29. add_member stores untrimmed name and email despite validating the trimmed email.
30. Message to everyone: the admin is excluded; to self is allowed.
31. Clock/reminder: reminder_minutes unbounded on server (u32), while batch is capped at 120.
32. save_sender writes sender then public URL in two non-atomic steps.
33. save_storage not mapped to a settings section (lands on profile).
34. Logs: queue cursor uses next_attempt_at (rows with no next attempt lose the newer/older link at that boundary). retry_send ignores requeue result.
35. Logs: ACTIVITY_KINDS filter omits parented, unparented, reminded, password reset kinds.
36. Logs: no retention or pruning for mail ledger or activity.
37. Logs and refusals on logs_page use English regardless of user language; Refusal for the settings page likewise.
38. Activity writes in tag/file-delete paths swallow errors (let _ =).
39. Turkish-language refusal fallback: BadSender falls back to English by design.
40. Store task_watcher table exists with no feature using it (unverified).
41. Board double-load: board page loads twice and applies filters twice.
42. Board: ?task=/redirect uses raw Referer on some paths (stale refusal params can persist after a later success on board.rs redirects).
43. Direction radio labels in link picker and new-task modal read backwards (values correct).
44. Card deadline shows "done" stamp; detail view does not (inconsistent done rendering).
45. New-task link picker lists all board tasks including subtasks and already linked ones (detail picker filters them).
46. Live stream: admin status fixed at connect (demoted admin keeps admin topics until reconnect, up to live_seconds).
47. Background task handles (sweep, directory, storage) are spawned and not joined: a panic is silent.
48. /healthz checks only the process (no DB/storage/im).
49. Stale names and docs: "in-client" and "im" mixing in comments; files.rs "Ported from iz-web/src/files.rs" self-reference; config.rs doc says relative paths resolve against config/ (they resolve against cwd); dev report line unreachable; DZ prefix hard-coded in provisioning; workspace name 'iz' hard-coded; actor "system" sentinel collides with a real id of the same string.
50. Tag names not validated server-side (HTML maxlength 60 only); no length limits on title, description, comment body, subtask title (HTML 200 only), mail subject (rule HTML 120, message HTML 200).
51. Mail From display name not escaped (may fail to parse).
52. Viewer-level delete_file and comment rights: delete_file checks uploader or admin only, not can_comment (a demoted user can delete old own uploads).
53. Dropped refusal on successful move keeps stale params in some redirects (see 42).
54. Duplicate queue/dedupe hazards: a crossing and a sweep at the same moment mail once (fixed by unique key); two passes over one owed send send once.
55. Two Refusal / message gaps: Refusal::BadPolicy exists in server.rs with no user (may belong to another settings surface).
56. SubtaskLine and DeletionCost doc comment mix-up in detail.rs.
57. Sheet reader: streamed and whole-workbook paths represent empty rows/cols differently; whole path ignores range start offset.
58. Slides reader: any unknown XML entity fails the whole deck; a relation to a missing slide part fails the whole deck while a sldId without a relation is silently dropped.
59. sniff: any unknown ISO-BMFF brand is labelled video/mp4 (M4A audio mislabelled); zip office detection is substring-based over the whole buffer; empty input sniffs as text/plain.
60. No image/svg+xml in sniffer, but the inline-render rule depends on that (not enforced in code).
61. Refusal message hard-codes "500 MB" instead of the constant.
62. Live: /people/ branch in live_script never matches (dead).
63. Dead code: client_label (only tests), DirectoryHealth.opened_at, Outcome enum (turso_store, unused), file_chip may_write unused, #[allow(unused_variables)] on settings_page and board_page, may_delete = may_write, sweep_orphan_files loop over one-element array.
64. Test-harness conflict with stated user preferences: crates/iz-web/tests/browser/run.sh and fake-im.mjs use node/npm/npx (user prefers bun). Tests also write to /tmp (reconcile tests use literal /tmp/iz.db and temp_dir; config tests use temp_dir).
65. Config shape drift: storage comment text duplicated between DEVELOPMENT_DEFAULTS and OPTIONAL_KEYS.
66. Mail composition: single and batch bodies repeat key and title; English only; no templates files.
Data-shape inconsistencies (for rebuild decisions):
- 'stored' vs 'local' attachment semantics: add_attachment writes 'stored'-named paths in comments but local disk; mark_attachment_stored deletes the local file; the meaning of remote_state must be pinned in the rebuild.
- Admin owner: never transferred; no UI to change owner.
- Store doc (mod.rs) says delete_tag moves tasks (stale) versus the real behaviour (refused when cards are on it).
Disagreements between slice reports (resolved where the code was checked):
- Migration 0001 length: 457 lines (wc) vs 391 (migrations slice; that was the fixture). 457 used here.
disabledon rebuild: reconcile sets 0 for all (reported by reconcile slice; migrations slice did not check).- Role gates on board/detail handlers: board.rs requires writer; detail.rs requires writer or can_comment per handler; the server slice could not confirm every handler gate. Treat section 2.3 gates as per the detail slice.
- Backoff: mail engine slice (cap unreachable) is correct; the rules slice's "capped at 60" is the formula, not the reachable value.
- Inbound SMTP: none exists (confirmed by smtp and mail slices).
10. Test inventory (for behaviour reference)
- http.rs (227 tests) covers: write permissions per role; board and detail behaviour; subtasks and tab routing; files (inline vs download, ranges, viewer, size and type limits, delete rights, cross-workspace not-found); settings (limits, sender validation, probe and test, storage, members and roles, owner protection); mail rules (create, read-back as sentence, enable, delete, foreign ids); logs (queue, retry, message, paging, filters); profile and preferences; avatars and asset cache rules; clock and reminders; tags (permissions, default tag, in-use); search and filters; live channel (topic gating, revoke, reconnect); SSO provisioning and disabled accounts; family switcher; in-service upload/download/delete and quota messages; create-and-move flows.
- store.rs (212 tests) covers: schema and reconcile (including backups, default tag seeding); subtasks; workspace and sender secrets (password not plaintext on disk; file owner-only); users and provisioning (owner claim, email claim, viewer demotion removes assignments, sync announcements); tags; board costs (six queries board, nine queries detail); dependencies and cycles; transitions and Done stamping; mail engine (decisions, claims, retries, batching, holds, reminders, invites, queue ordering); activity paging; files (storage tree, remote rows, resniff at boot); settings announcements.
- browser tests (Playwright; need node/npm and Chromium): soft-nav (no full reload between pages); moment (date+clock picker and card label
Mon DD · HH:MM); photo (avatar renders and survives refresh); drop (file drop zone states and drop targets). Fake im serves introspection and a 1x1 PNG photo.
11. Rebuild-critical rules (summary)
- Overdue: one rule everywhere (see 2.4).
- Done/finish: moving into an is_done column stamps done_at; a card with open subtasks cannot enter it.
- Subtasks: one level; a parent with children cannot become a part; deleting parent deletes direct children.
- Dependencies: no cycles over live edges; soft clear; finished blockers stop blocking; delete of a blocker frees dependents and writes a freeing event.
- Viewers: read-only and excluded from mail and assignment.
- Mail: per-recipient claim with unique key; 5 attempts; 5/10/20/40 minute backoff; 1-minute hold without sender; 5-minute lease; batch window per workspace with 4x ceiling; decisions ledger for every verdict.
- Reminders: one per assignee before a clock time; re-derived on every change; abandoned on finish/delete/unassign.
- Live: data-free change notices with a sequence number; client re-reads through normal routes; admin topics admin-only.
- Attachments: sniffed MIME, allow-list by extension, per-workspace size, remote mode via in service with bearer token and external id = attachment id.
- Config: strict on database and oidc; lenient on unknown keys; no env vars.