Add the assess container for Jev triage #19

Closed
opened 2026-10-31 03:45:50 +00:00 by svc-agent-writer · 0 comments

Epic: #8

The assessor: Jev triage at sync time (ADR 0003 §1, §2 and §4, as accepted in #35).

Answers to the open questions

  • Client. TypeSafe Jev is a plain HTTPS API. The estate uses no SDK, so this repo uses stdlib urllib.
    • Request: POST https://api.typesafe.ai/v1/systemone with authorization: Bearer <key>. The body is {"model","state","questions"}.
    • Choice answer: {"type":"choice","choice","confidence","probabilities"}.
    • Score: criteria is an ordered list of 2 to 10 levels. The answer is {"type":"score","score":0..N-1,"confidence","legend","probabilities"}.
    • Transport precedent: one call per batch, a timeout, one retry that honours retry-after on 429 and 529, and then the outcome unavailable.
  • Credential. One key per consumer, as a file. The config names the file in [assess] key_file. The 1Password item and the Secret are deployment tasks.

What to build

  • Where it runs. The assessor is a thread in the sync process, not a new container. The sync worker stays the one writer of the mirror tables.

  • Config. An optional [assess] section:

    • key_file
    • fields: headers (the default) or full
    • model: pinned, default jev-1.13.0
    • batch
    • backlog_days
    • poll_seconds
    • timeout_seconds

    When the section is absent, nothing leaves the host.

  • Scope. Inbox-role rows where triage_class IS NULL, within backlog_days. A row whose Message-ID already has a class copies that class, and Jev is not called for it.

  • Questions. One Choice over the six classes in §2 and one Score for wake, per message.

  • Logs. Counts, the outcome, the model and token counts only.

Acceptance

  • A test asserts the exact state keys for each field mode.
  • A fake Jev server test runs end to end. It proves that the key never appears in the logs.
  • One retry on 429.
  • An absent config means no thread and no call.
  • make check passes.

Blocked by

Epic: #8 The assessor: Jev triage at sync time (ADR 0003 §1, §2 and §4, as accepted in #35). ## Answers to the open questions - **Client.** TypeSafe Jev is a plain HTTPS API. The estate uses no SDK, so this repo uses stdlib `urllib`. - Request: `POST https://api.typesafe.ai/v1/systemone` with `authorization: Bearer <key>`. The body is `{"model","state","questions"}`. - Choice answer: `{"type":"choice","choice","confidence","probabilities"}`. - Score: `criteria` is an ordered list of 2 to 10 levels. The answer is `{"type":"score","score":0..N-1,"confidence","legend","probabilities"}`. - Transport precedent: one call per batch, a timeout, one retry that honours `retry-after` on 429 and 529, and then the outcome `unavailable`. - **Credential.** One key per consumer, as a file. The config names the file in `[assess] key_file`. The 1Password item and the Secret are deployment tasks. ## What to build - **Where it runs.** The assessor is a thread in the `sync` process, not a new container. The sync worker stays the one writer of the mirror tables. - **Config.** An optional `[assess]` section: - `key_file` - `fields`: `headers` (the default) or `full` - `model`: pinned, default `jev-1.13.0` - `batch` - `backlog_days` - `poll_seconds` - `timeout_seconds` When the section is absent, nothing leaves the host. - **Scope.** Inbox-role rows where `triage_class IS NULL`, within `backlog_days`. A row whose Message-ID already has a class copies that class, and Jev is not called for it. - **Questions.** One Choice over the six classes in §2 and one Score for wake, per message. - **Logs.** Counts, the outcome, the model and token counts only. ## Acceptance - A test asserts the exact state keys for each field mode. - A fake Jev server test runs end to end. It proves that the key never appears in the logs. - One retry on 429. - An absent config means no thread and no call. - `make check` passes. ## Blocked by - #18
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dev/mail-mind-mcp#19
No description provided.