hardbyte / hardbyte/awa

awa-ui response-type discipline: handlers stop returning JobRow (the hygiene half of #143)

Open
#403 0 comments 0 reactions 0 assignees View on GitHub
operational
Dominant language
Rust
Stars
32
Forks
5
Avg merge
15h 21m
Merged PRs (30d)
21

Description

The half of #143 worth doing in 0.7, exactly as scoped by the April revert notes on that issue: a `pub mod response` inside `awa-ui` so no handler returns `JobRow` (or any `FromRow` DAL struct) directly — every endpoint returns a documented response type with computed-field logic (e.g. ADR-005 `original_priority`) living beside it. ~10 handler sites currently reference `JobRow`.

This is what the stability policy's HTTP-admin-API row (#369 / ADR-036) actually needs: a typed, non-DAL response boundary. The **crate split itself stays deferred** on #143 (now 0.8): the first genuine second consumer is the MCP server proposal (#389), which matches the revisit triggers written down in April ('a third-party crate wants to mount Awa's routes / consume the types'), and `ReadOnlyMode` etc. were already shaped to transfer cleanly.

Acceptance: no `FromRow` type appears in a handler return; response types live in one module with doc comments; `ui-design.md` lists the documented endpoints/schemas the policy points at.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the roughly 10 handler sites in awa-ui that reference JobRow or another FromRow type, then read ADR-005 and the April revert notes on #143 for the response-boundary context. Define the documented response types in awa-ui's response module and update ui-design.md with the endpoints and schemas; done means no handler returns a FromRow type and the listed acceptance checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design, documentation
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.