GFX Status-First Surface and Fault Matrix
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
# PR002 - GFX Status-First Surface and Fault Matrix
|
||||
|
||||
## Briefing
|
||||
|
||||
A decision `008` fechou politica status-first em `gfx`, incluindo:
|
||||
|
||||
- sem no-op silencioso para erro operacional;
|
||||
- retorno `status` quando houver possibilidade real de falha;
|
||||
- `Trap` apenas estrutural e `Panic` apenas invariante.
|
||||
|
||||
## Alvo
|
||||
|
||||
Implementar o contrato de `gfx` no runtime e atualizar spec do dominio.
|
||||
|
||||
Arquivos principais:
|
||||
|
||||
- `docs/runtime/specs/04-gfx-peripheral.md`
|
||||
- `crates/console/prometeu-hal/src/syscalls/domains/gfx.rs`
|
||||
- `crates/console/prometeu-system/src/virtual_machine_runtime/dispatch.rs`
|
||||
|
||||
## Escopo Funcional
|
||||
|
||||
- fechar matriz por syscall (`void` vs `status`);
|
||||
- remover fallback implicito em `gfx.set_sprite`;
|
||||
- mapear casos operacionais para status inteiros por operacao;
|
||||
- remover `Panic` acidental por argumento de app no dominio `gfx`.
|
||||
|
||||
## Fora de Escopo
|
||||
|
||||
- redesign de pipeline grafico;
|
||||
- mudancas de feature fora do conjunto atual de syscalls `gfx`.
|
||||
|
||||
## Critérios de Aceite
|
||||
|
||||
- metadata de syscall `gfx` (arg/ret slots) alinhada com matriz definida;
|
||||
- `set_sprite` nao usa fallback implicito para banco default;
|
||||
- casos operacionais invalidos retornam `status` e nao no-op silencioso;
|
||||
- testes cobrindo pelo menos:
|
||||
- sprite index invalido;
|
||||
- asset ausente;
|
||||
- faixas invalidas de parametro.
|
||||
|
||||
## Tests
|
||||
|
||||
- `cargo test -p prometeu-system`
|
||||
- `cargo test -p prometeu-hal`
|
||||
- testes de regressao especificos de `dispatch` e dominio `gfx`.
|
||||
@@ -526,6 +526,25 @@ Fault boundary:
|
||||
|
||||
### 19.1 `gfx.set_sprite`
|
||||
|
||||
Return-shape matrix in v1:
|
||||
|
||||
| Syscall | Return | Policy basis |
|
||||
| ------------------ | ------------- | ---------------------------------------------------- |
|
||||
| `gfx.clear` | `void` | no real operational failure path in v1 |
|
||||
| `gfx.fill_rect` | `void` | no real operational failure path in v1 |
|
||||
| `gfx.draw_line` | `void` | no real operational failure path in v1 |
|
||||
| `gfx.draw_circle` | `void` | no real operational failure path in v1 |
|
||||
| `gfx.draw_disc` | `void` | no real operational failure path in v1 |
|
||||
| `gfx.draw_square` | `void` | no real operational failure path in v1 |
|
||||
| `gfx.set_sprite` | `status:int` | operational rejection must be explicit |
|
||||
| `gfx.draw_text` | `void` | no real operational failure path in v1 |
|
||||
| `gfx.clear_565` | `void` | no real operational failure path in v1 |
|
||||
|
||||
Only `gfx.set_sprite` is status-returning in v1.
|
||||
All other `gfx` syscalls remain `void` unless a future domain revision introduces a real operational failure path.
|
||||
|
||||
### 19.2 `gfx.set_sprite`
|
||||
|
||||
`gfx.set_sprite` returns `status:int`.
|
||||
|
||||
Minimum status table:
|
||||
|
||||
Reference in New Issue
Block a user