feed: Phase 1 stream model — normalize, APL-backed filter/sort/take/reverse, post/all api + 30 tests
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 49s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 49s
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,7 @@ APL, ACL visibility filtering via `lib/acl/`, federation via fed-sx.
|
||||
|
||||
## Status (rolling)
|
||||
|
||||
`bash lib/feed/conformance.sh` → **0/0** (not yet started)
|
||||
`bash lib/feed/conformance.sh` → **30/30** (Phase 1 complete)
|
||||
|
||||
## Ground rules
|
||||
|
||||
@@ -59,13 +59,13 @@ lib/feed/api.sx lib/feed/fed.sx
|
||||
|
||||
## Phase 1 — Stream model + basic ops
|
||||
|
||||
- [ ] `lib/feed/normalize.sx` — activity record schema; coerce arbitrary inputs
|
||||
- [ ] `lib/feed/stream.sx` — APL vector representation; filter by predicate; sort by
|
||||
- [x] `lib/feed/normalize.sx` — activity record schema; coerce arbitrary inputs
|
||||
- [x] `lib/feed/stream.sx` — APL vector representation; filter by predicate; sort by
|
||||
`:at`; take N (`↑`); reverse (`⌽`)
|
||||
- [ ] `lib/feed/api.sx` — `(feed/post activity)`, `(feed/all)`
|
||||
- [ ] `lib/feed/tests/basic.sx` — 15+ cases: post, query, filter, sort
|
||||
- [ ] `lib/feed/scoreboard.{json,md}`
|
||||
- [ ] `lib/feed/conformance.sh`
|
||||
- [x] `lib/feed/api.sx` — `(feed/post activity)`, `(feed/all)`
|
||||
- [x] `lib/feed/tests/basic.sx` — 30 cases: normalize defaults, filter, sort, take, api
|
||||
- [x] `lib/feed/scoreboard.{json,md}`
|
||||
- [x] `lib/feed/conformance.sh`
|
||||
|
||||
## Phase 2 — Fanout via outer product
|
||||
|
||||
@@ -98,8 +98,22 @@ lib/feed/api.sx lib/feed/fed.sx
|
||||
|
||||
## Progress log
|
||||
|
||||
(loop fills this in)
|
||||
- **Phase 1 done (30/30).** Stream = APL rank-1 array whose ravel holds activity
|
||||
dicts. `normalize.sx` (record schema + accessors), `stream.sx` (filter via `/`
|
||||
compress, sort via `⍋` grade-up [stable], take via `↑`, reverse via `⌽`,
|
||||
by-actor/verb/object/since predicates), `api.sx` (mutable log: post/all/reset!/size).
|
||||
Substrate: `apl-compress`, `apl-grade-up`, `apl-take`, `apl-reverse`, `make-array`.
|
||||
Grade-up returns 1-based indices (⎕IO=1), is stable on ties → deterministic sort.
|
||||
|
||||
## Blockers
|
||||
|
||||
(loop fills this in)
|
||||
(none)
|
||||
|
||||
## Notes for next iteration
|
||||
|
||||
- sx-tree MCP tools take `file:` NOT `path:` (CLAUDE.md is stale). Wrong key →
|
||||
`Yojson Type_error("Expected string, got null")`. Looks like a broken binary, isn't.
|
||||
- sx_server binary lives in main repo: `/root/rose-ash/hosts/ocaml/_build/default/bin/sx_server.exe`
|
||||
(worktree has no `_build`). conformance.sh already points there with relative fallback.
|
||||
- Phase 2 substrate verified available: `apl-outer` (∘.×), `apl-member` (∊),
|
||||
`apl-unique`, `apl-iota` (1-based).
|
||||
|
||||
Reference in New Issue
Block a user