artdag: DAG wire serialization — portable record form + integrity + 13 tests
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 50s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 50s
serialize.sx emits a topo-ordered (id op inputs params commutative) record list that survives write/read (string-keyed node dicts do not; empty inputs read back as nil and are normalized). wire->dag reconstructs a runnable dag by content-id; wire-verify recomputes ids to reject tampering. dag->string/string->dag for text transport. serialize 13/13, total 128/128. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,7 @@ edges.
|
||||
|
||||
## Status (rolling)
|
||||
|
||||
`bash lib/artdag/conformance.sh` → **115/115** (7 suites: dag, analyze, plan, execute, optimize, fed, cost)
|
||||
`bash lib/artdag/conformance.sh` → **128/128** (8 suites: dag, analyze, plan, execute, optimize, fed, cost, serialize)
|
||||
|
||||
Base roadmap (Phases 1–6) COMPLETE. Now extending.
|
||||
|
||||
@@ -138,6 +138,17 @@ lib/artdag/optimize.sx lib/artdag/federation.sx
|
||||
|
||||
## Progress log
|
||||
|
||||
- **Ext: DAG wire serialization** (serialize suite 13/13, total 128/128).
|
||||
`lib/artdag/serialize.sx`: `dag->wire` emits a topo-ordered list of
|
||||
`(id op inputs params commutative)` records — plain lists with keyword-keyed param
|
||||
dicts, which survive `write-to-string`/`read` (string-keyed node dicts do NOT; and
|
||||
`()` reads back as nil, so `wire->dag` normalizes empty inputs). `wire->dag`
|
||||
reconstructs a runnable dag by content-id (author names dropped); executes
|
||||
identically to the original. `wire-verify` recomputes each record's content-id and
|
||||
rejects tampered ids or mutated params under a stale id (self-verifying transport).
|
||||
`dag->string`/`string->dag` for text transport. Gotcha logged: `sx-parse` primitive
|
||||
is unbound in the server env — use `(read (open-input-string s))`.
|
||||
|
||||
- **Ext: cost-based scheduling** (cost suite 13/13, total 115/115).
|
||||
`lib/artdag/cost.sx`: an injected `cost-fn (op params)` keeps media-op costs opaque
|
||||
(`const-cost`, `op-cost table`). `critical-path` = longest weighted path (finish-time
|
||||
|
||||
Reference in New Issue
Block a user