obs(03-05): fixtures, black-box schema test, CI/consumer gate and protocol docs
This commit is contained in:
1 parent
e6e497e68b
commit
2d51f08340
21 files changed
+467
-13
No files matched your search
@@ -0,0 +1,21 @@
|
||||
# Execution Events v1 fixtures
|
||||
|
||||
These are the minimal executable fixtures from RFC-OBS-0001 §13 plus the
|
||||
schema-validation fixtures used by
|
||||
[`execution_events_consumer.py`](../../execution_events_consumer.py).
|
||||
|
||||
| File | Purpose |
|
||||
|---|---|
|
||||
| `basic.mq.md` | Fixture A: live stdout ordering and return value. |
|
||||
| `realtime.mq.md` | Fixture B: `READY` must be observable before the run exits. |
|
||||
| `structure.mq.md` | Fixture C: `main -> f -> g`, repeated calls, branch, loop. |
|
||||
| `values.mq.md` | Fixture D: default privacy and exact value selection. |
|
||||
| `valid/*.jsonl` | Schema-valid streams (minimal and full event table). |
|
||||
| `invalid/*.json` | One-object negative fixtures: unknown major, missing/`negative` seq, bad chunk/span/terminal. |
|
||||
|
||||
The `.mq.md` files are inputs to the released CLI:
|
||||
|
||||
```bash
|
||||
marqdo run tests/consumers/fixtures/execution-events/basic.mq.md --event-stream jsonl
|
||||
python3 tests/consumers/execution_events_consumer.py /tmp/events.jsonl
|
||||
```
|
||||
@@ -0,0 +1,11 @@
|
||||
# @knowledge Execution Events fixture A
|
||||
|
||||
## @exec main
|
||||
|
||||
`打印("START")`
|
||||
|
||||
`n = 10`
|
||||
|
||||
`打印("DONE")`
|
||||
|
||||
`return n`
|
||||
@@ -0,0 +1,17 @@
|
||||
# @knowledge Execution Events fixture B
|
||||
|
||||
## @exec main
|
||||
|
||||
`打印("READY")`
|
||||
|
||||
`i = 0`
|
||||
|
||||
`while i < 2000000`
|
||||
|
||||
`i = i + 1`
|
||||
|
||||
`end`
|
||||
|
||||
`打印("FINISH")`
|
||||
|
||||
`return i`
|
||||
@@ -0,0 +1,35 @@
|
||||
# @knowledge Execution Events fixture C
|
||||
|
||||
## @exec g
|
||||
|
||||
`params(n: Int)`
|
||||
|
||||
`return n + 1`
|
||||
|
||||
## @exec f
|
||||
|
||||
`params(n: Int)`
|
||||
|
||||
`if n > 0`
|
||||
|
||||
`return g(n=n)`
|
||||
|
||||
`end`
|
||||
|
||||
`return n`
|
||||
|
||||
## @exec main
|
||||
|
||||
`i = 0`
|
||||
|
||||
`while i < 2`
|
||||
|
||||
`i = i + 1`
|
||||
|
||||
`end`
|
||||
|
||||
`a = f(n=2)`
|
||||
|
||||
`b = f(n=0)`
|
||||
|
||||
`return a + b`
|
||||
@@ -0,0 +1,9 @@
|
||||
# @knowledge Execution Events fixture D
|
||||
|
||||
## @exec main
|
||||
|
||||
`secret_token = "DO_NOT_LEAK_SENTINEL_1"`
|
||||
|
||||
`visible_count = 42`
|
||||
|
||||
`return visible_count`
|
||||
Reference in new issue
Block a user