plans/sx-review: dogfood — store the review program in git-sx via gitea-sx

Built the SX-review remediation program as native fed-sx objects using the
now-green forge stack (sx-git 267/267, sx-gitea 615/615, agentic-sx 196/196):

- gitea-sx forge repo "rose-ash/sx-review" (one persist backend)
- agentic-sx session: coordinator + 16 workstream agent branches
  (agents/ws-W1 .. ws-W16), each with a briefing (goal + finding-ids + status)
  and a finding-commit carrying its workstream as queryable SX data
- baseline decision-commit sx1:a495549... (MANIFEST: 217 findings / 16
  workstreams / real-git a24c8796 / done-commit dc7aa709)
- the completed quick-wins batch recorded as a refactor-commit

forge-build.sxsrc is the reproducible source (content-addressed → re-running
yields identical CIDs); forge.sxdata is the durable kv+stream snapshot
(45KB, 299 native sx1: objects). Load order = agentic conformance base +
relations + gitea/repo; run bounded, never the shared MCP image.

The review is now first-class queryable data in the native store, not just
markdown — each workstream/finding is addressable by CID.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 22:08:05 +00:00
parent a24c879664
commit 8651cefed9
2 changed files with 107 additions and 0 deletions

View File

@@ -0,0 +1,106 @@
; forge-build.sxsrc — dogfood: store the SX-review program in git-sx via gitea-sx,
; and stand up the agentic-sx fix session (one agent branch per workstream).
; (.sxsrc so the Write tool is not blocked; load-by-content works regardless.)
;
; Run bounded (NOT the shared MCP image); base+relations+agentic/branch+gitea/repo
; must be loaded first. The final (fb-forge-serialize) returns the durable kv+stream
; dump as an SX string, captured by the build wrapper into forge.sxdata.
;
; The review is stored as NATIVE TYPED OBJECTS, not markdown blobs: each workstream
; is a finding-commit on its own agent branch, carrying its finding-ids + status,
; so the whole program is queryable git-sx data (the fed-sx property).
; --- one backend shared by the forge and the agentic session ---
(define fb-db (persist/mem-backend))
(define fb-forge (gitea/forge fb-db))
(gitea/user-create! fb-forge "rose-ash")
(define fb-repo-rec (gitea/repo-create! fb-forge "rose-ash" "sx-review"
{:description "SX language/runtime review — 3-lane findings + remediation" :created-at 20260703}))
; agentic session shares the gitea repo's git namespace ("forge/<owner>/<name>")
(define fb-sp (agentic/space fb-db "forge/rose-ash/sx-review"))
(define fb-repo (agentic/space-repo fb-sp))
; --- coordinator + review baseline (points at the real-git snapshot) ---
(define fb-root
(agentic/spawn! fb-sp "coordinator"
(agentic/briefing "SX review remediation"
"Drive every workstream to green per plans/sx-review/PLAN.md; nothing dropped." {})))
(define fb-manifest
"(sx-review :lanes (core hosts conformance) :finding-instances 217 :workstreams 16 :real-git \"a24c8796\" :plan \"plans/sx-review/PLAN.md\" :rulings \"plans/sx-review/RULINGS.md\" :done-commit \"dc7aa709\")")
(define fb-baseline
(agentic/commit! fb-sp "coordinator" "decision"
(assoc {} "MANIFEST.sx" fb-manifest)
{:message "SX review baseline — 217 findings across 16 workstreams"}))
; --- workstreams: id title goal finding-ids status ---
(define fb-workstreams (list
(list "W1" "Condition system & continuations" "handler installation, delimited-continuation replay, dynamic-wind, catchable errors"
"K01 K03 K10 K12 K36 K41 K57 K106 S10" "OPEN")
(list "W2" "Environment & scope integrity" "letrec/named-let/env-merge leaks, unshadowable names, unwind-safe dynamic state, set!"
"K04 K05 K06 K07 K30 K31 K32 K33 K40 K74 K75 K107 J8" "OPEN")
(list "W3" "HTTP-mode concurrency & serving safety" "Domain race, per-request globals, cache keying, URL-eval, hydration"
"S1 S2 S3 S5 S11 S12 S13 K30" "OPEN")
(list "W4" "Higher-order forms & threading" "ho-swap ambiguity, reduce arities, O(n^2), first-class HO, threading"
"K13 K14 K15 K43 K44 K45 K46 K47 K78 K79 K80 K81 J7" "OPEN")
(list "W5" "Special forms & macros" "cond dual-grammar, quasiquote depth/dict, case, letrec-star, match guards, key, values"
"K08 K34 K35 K37 K38 K70 K71 K72 K76 K77 K42" "OPEN")
(list "W6" "Parser, serializer, canonical & CIDs" "one classifier, escapes, reader-macros, dict-key serialize, CID fixed-point"
"K21 K22 K23 K24 K25 K63 K64 K65 K66 K67 K68 K69 K100 K101 K102 K103 K108 C25 C26 C27" "OPEN")
(list "W7" "Numbers, equality, strings, collections" "append!, codepoints, eq/eqv, overflow, float wire, div0, apply, sort, parity"
"K17 K52 K53 K54 K55 K56 K85 K86 K87 K88 K89 K90 K91 K92 P1 P2 P3 P4 P5 P6 P7 P8 P10 P11 P12" "OPEN")
(list "W8" "Render pipeline" "recursion guard, attr-name injection, aser kwargs, dom/html parity, script/style, depth"
"K16 K48 K50 K51 K82 K83 K84 C19 C20 S14 S9" "OPEN")
(list "W9" "Strict typing" "chokepoint checks, type-name validation, component/keyword types, as-type"
"K26 K27 K58 K59 K60 K93 K94 K95 K96 K97" "OPEN")
(list "W10" "Signals & coroutines" "dispose-computed, batch wedge, equality change-detection, glitch-freedom, cleanup"
"K28 K29 K61 K62 K98 K99 K109 K110" "OPEN")
(list "W11" "JIT correctness (re-enable preconditions)" "thread-step, fallback double-effect, macro-aware, kwargs, redef invalidation, sync"
"J1 J2 J3 J4 J5 J6 J7 J10 J11 K33 K19 C10 C11 C12 C14" "DEFERRED")
(list "W12" "Python bridge & boundary" "boundary validation, SxExpr, reader-macro sync, bridge timeouts, epoch parse"
"C24 C28 C29 C30 C31 S-bridge S-bridge2 K42" "OPEN")
(list "W13" "JS host (GATE D1 — likely delete)" "hollow bundle, red gate, record-type, callbacks, arithmetic, parser"
"C0a C0b JS1 JS2 JS3 JS4 JS5 JS6 JS7 JS8" "GATE-D1")
(list "W14" "Test gate & conformance infrastructure" "runner=prod env, WASM corpus runner, harness honesty, protocol fuzz, differential"
"C0b C9 C21 C22 C23 C3 C4 C5 C6 C7 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 K19 K104" "OPEN")
(list "W15" "Hygiene & documentation" "dead trees/blobs, r7rs radix shadow, doc drift, regen-diff gate"
"C2 C8 C13 C15 C16 C17 C18 F14 F15" "OPEN")
(list "W16" "Hyperscript shipped-kernel conformance" "host-call-fn binding, jit-exclude drift, mock-DOM red band, corpus drift + assert-order"
"F16 F17 F18 F19" "OPEN")))
; spawn one agent branch per workstream, each carrying a finding-commit
(define fb-spawn-ws
(fn (ws)
(let ((id (first ws)) (title (nth ws 1)) (goal (nth ws 2))
(findings (nth ws 3)) (status (nth ws 4)))
(let ((agent (str "ws-" id)))
(agentic/spawn-from! fb-sp agent
(agentic/briefing (str id " — " title) goal
{:workstream id :findings findings :status status})
"coordinator")
(agentic/commit! fb-sp agent "finding"
(assoc {} (str id ".sx")
(str "(workstream :id \"" id "\" :title \"" title "\" :status \"" status
"\" :findings \"" findings "\")"))
{:message (str id ": " title)})))))
(define fb-ws-cids (map fb-spawn-ws fb-workstreams))
; record the completed quick-wins batch as a refactor commit on the coordinator
(define fb-done
(agentic/commit! fb-sp "coordinator" "refactor"
(assoc {} "DONE.sx"
"(batch :commit \"dc7aa709\" :fixed (K02 K09 K11 K18 K20 K39 K49 K73 K105 C1 C1b S4 F13) :partial (K19 K42 C24 F14) :suite \"5762p-274f-baseline\")")
{:message "quick-wins batch dc7aa709 recorded"}))
; --- durable dump: kv + streams of the shared backend, serialized ---
(define fb-forge-serialize
(fn ()
(sx-serialize
{:review "sx-review" :baseline fb-baseline :done fb-done
:agents (agentic/agents fb-sp)
:workstream-cids fb-ws-cids
:kv (map (fn (k) (list k ((get fb-db :kv-get) k))) ((get fb-db :kv-keys)))
:streams (map (fn (s) (list s ((get fb-db :read) s))) ((get fb-db :streams)))})))

File diff suppressed because one or more lines are too long