Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 122 additions & 0 deletions docs/BACKLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5599,6 +5599,128 @@ systems. This track claims the space.

## P2 — research-grade

- [ ] **Cross-DSL composability — git / SQL /
operator-algebra / LINQ access each other seamlessly
with full index utilization.** Maintainer 2026-04-24
directive (verbatim):

> *"i would love to be able to see git as composable
> with the rest of the DSLs too so they all can access
> each other seamlessly and still hit indexes and get
> all the performanes and everyting. backlog and
> draing this one and contineue"*

Scope: every first-class interface on Zeta's
substrate (git, SQL, operator algebra, LINQ, future
GraphQL / blockchain query / WASM-RPC) must compose
with every other interface. A query that mixes git
semantics + SQL semantics + operator-algebra
semantics in a single expression should:
1. **Parse + bind** through the unified type system.
2. **Plan** through the cost-based query optimizer
(`query-optimizer-expert`) which sees the full
mixed-DSL AST.
3. **Hit indexes** for each constituent DSL (the
hierarchical index from the
closure-table-hardening row, the row-index from
SQL, the operator-algebra's incremental view
materialized, etc.).
4. **Execute** with retraction-native semantics
preserved end-to-end (a git-revert in the input
stream produces a Z-set retraction in the output).

**Cross-DSL examples (motivating use cases):**
- "SQL JOIN where left side is a git log query and
right side is a Z-set delta from operator algebra."
- "Git push where the tree is computed by a SQL
SELECT over Z-sets."
- "LINQ query over a blockchain block stream
correlated with git commits."
- "Operator-algebra incremental view that consumes
git commits AND SQL inserts, fans out into
multiple downstream Z-sets."

**Architectural primitives required:**
- **Unified AST** spanning all DSLs (or
cross-translation matrix between DSL ASTs).
- **Plan-time optimizer** that sees the mixed
expression and chooses the right index per leaf.
Composes with `query-planner` +
`query-optimizer-expert` + `binder-expert` (need a
`binder-cross-dsl` capability).
- **Adapter pattern** between DSLs at the algebraic
layer — the operator algebra's D/I/z⁻¹/H operators
must commute with git's commit/branch/merge AND
SQL's relational operators (this is where
K-relations / semiring-parameterized Zeta
substrate from the prior research becomes
load-bearing — same algebra hosts all the
other DSLs).
- **Retraction-preserving translation** at every
boundary.

**Composes with (load-bearing):**
- **Closure-table hierarchical index** — the
`Hierarchy.fs` closure-table operator
(`src/Core/Hierarchy.fs`) plus the "Closure-table
over DBSP" research row in this same `docs/BACKLOG.md`
under `## Research projects` (paper-grade target:
"first retraction-native incremental transitive
closure with tropical-semiring shortest-path free
variant"). The hierarchical index this query layer
hits.
- **Native F# git implementation** (#395) — git as
first-class DSL.
- **Mode 2 protocol-upgrade negotiation** (#395) —
fast protocol carries cross-DSL queries.
- **Ouroboros bootstrap meta-thesis** (#395) —
cross-DSL composability is itself an Ouroboros
closure: the system's interfaces compose with
themselves through the same substrate.
- **Semiring-parameterized Zeta substrate** — the
"one algebra to map the others" frame from the
2026-04-22 maintainer auto-loop-38 thread (memory:
`memory/project_semiring_parameterized_zeta_regime_change_one_algebra_to_map_others_2026_04_22.md`).
This row is a direct application of that
research-changing claim: if the operator algebra
is parameterized by a semiring, every other DSL's
semantics maps into the same one algebra by
semiring-swap, and the cross-DSL composability
falls out for free.
- **Blockchain ingest** (#394) — chain queries
compose with git/SQL queries via the same
substrate.

**Phased approach:**
- **Phase 0** — design proposal:
`docs/research/cross-dsl-composability-2026.md`.
Interface map between every pair of DSLs.
Identify the canonical algebra (the operator
algebra under semiring-param) as the unifying
layer. Empirically verify a representative
cross-DSL query plans + executes correctly on a
small workload.
- **Phase 1** — pairwise adapters: git ↔ SQL, SQL
↔ operator-algebra, etc.
- **Phase 2** — unified planner / binder.
- **Phase 3** — index-utilization audit: every
leaf-DSL must hit its native index in mixed
expressions.
- **Phase 4** — retraction-preservation at every
boundary (formal proof or property-based
verification).

Priority P2 research-grade; effort L+ (Phase 0
research) + L+L+M+L (Phases 1-4). Composes with
Otto-275 log-don't-implement.

**Does NOT authorize** starting implementation
without Phase 0 research landing. **Does NOT
authorize** declaring composability "done" without
empirical evidence that mixed-DSL queries hit ALL
applicable indexes (no full-scan fallback for
composed leaves).

- [ ] **Blockchain block ingestion — first-class BTC /
ETH / SOL streaming into Zeta's distributed database;
bi-directional protocol participation; cross-chain
Expand Down
177 changes: 177 additions & 0 deletions docs/pr-preservation/397-drain-log.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
# PR #397 drain log — cross-DSL composability BACKLOG row

PR: <https://github.com/Lucent-Financial-Group/Zeta/pull/397>
Branch: `backlog/cross-dsl-composability`
Drain session: 2026-04-24 (Otto)
Thread count at drain start: 5 unresolved

Per Aaron's 2026-04-24 PR-comment-preservation directive:
full per-thread record with verbatim reviewer text, outcome,
verbatim reply, and resolution commit. Docs-only PR adding a
single P2 research-grade BACKLOG row for git/SQL/operator-
algebra/LINQ cross-DSL composability under semiring-
parameterized substrate.

---

## Thread 1 — `docs/BACKLOG.md:5664` — closure-table dependency pointer

- Reviewer: `copilot-pull-request-reviewer`
- Thread ID: `PRRT_kwDOSF9kNM59iQrr`
- Severity: P2

### Original comment (verbatim)

> **P2 Badge** Point to an existing backlog dependency
>
> This dependency note says the work composes with a
> "Closure-table hardening" row in the same `docs/BACKLOG.md`
> section, but there is no such row anywhere in the file
> (repo-wide search in `docs/BACKLOG.md` only finds this
> mention). That leaves this item with an unresolvable
> prerequisite, which weakens planning/ordering for the
> research phases because readers cannot find the referenced
> index-hardening task to scope or schedule it.

### Outcome

FIX — pointer made concrete. The "same section" wording was
wrong; the actual matching surfaces are `src/Core/Hierarchy.fs`
(live closure-table operator) plus the "Closure-table over
DBSP" research row under `## Research projects`. Bullet
rewritten to name both targets so a reader can navigate to
either the code or the paper-grade research row.

### Reply (verbatim)

> Fixed. Pointer rewritten to name two concrete surfaces:
> `src/Core/Hierarchy.fs` (live closure-table operator) and
> the "Closure-table over DBSP" research row under
> `## Research projects` in `docs/BACKLOG.md`. The original
> "same section" wording was wrong — the dependency lives in
> two places (code + research row in a different section),
> not a single hardening row in this P2 section. Resolved.

---

## Thread 2 — `docs/BACKLOG.md:5604` — title hyphen split

- Reviewer: `copilot-pull-request-reviewer`
- Thread ID: `PRRT_kwDOSF9kNM59iRTm`
- Severity: P1

### Original comment (verbatim)

> P1: The line break in the checklist title splits a hyphenated
> term (`operator-` / `algebra`), which will render as
> "operator- algebra" in Markdown. Rewrap so `operator-algebra`
> stays intact (or remove the hyphen).

### Outcome

FIX — title rewrapped so `operator-algebra` stays on one line.
Soft line break moved between `SQL /` and `operator-algebra`.

### Reply (verbatim)

> Fixed. Title rewrapped so `operator-algebra` is contiguous
> on a single line. Resolved.

---

## Thread 3 — `docs/BACKLOG.md:5626` — closure-table-hardening hyphen split

- Reviewer: `copilot-pull-request-reviewer`
- Thread ID: `PRRT_kwDOSF9kNM59iRT1`
- Severity: P1

### Original comment (verbatim)

> P1: This line wrap splits "closure-table-" from "hardening",
> which will render as "closure-table- hardening". Please
> rewrap without breaking the hyphenated token (or drop the
> trailing hyphen).

### Outcome

FIX — bullet rewrapped so `closure-table-hardening` stays
contiguous on a single line. Subsequent paragraph reflowed.

### Reply (verbatim)

> Fixed. Bullet rewrapped so `closure-table-hardening` is
> contiguous on a single line; subsequent text reflowed.
> Resolved.

---

## Thread 4 — `docs/BACKLOG.md:5650` — query-optimizer-expert inline-code split

- Reviewer: `copilot-pull-request-reviewer`
- Thread ID: `PRRT_kwDOSF9kNM59iRT8`
- Severity: P0

### Original comment (verbatim)

> P0: The inline-code reference to `query-optimizer-expert` is
> split across lines as `query-optimizer-` / `expert`, which
> renders incorrectly (and can break readability/search).
> Rewrap so the inline-code token stays contiguous on one line.

### Outcome

FIX — bullet rewrapped so the inline-code token
`` `query-optimizer-expert` `` stays contiguous on a single
line. Subsequent lines reflowed.

### Reply (verbatim)

> Fixed. Bullet rewrapped so the inline-code token
> `query-optimizer-expert` is contiguous on a single line;
> the surrounding text reflowed without breaking other
> inline-code tokens. Resolved.

---

## Thread 5 — `docs/BACKLOG.md:5677` — memory/ prefix on memory pointer

- Reviewer: `copilot-pull-request-reviewer`
- Thread ID: `PRRT_kwDOSF9kNM59iRUJ`
- Severity: P1

### Original comment (verbatim)

> P1: The memory reference is missing the `memory/` prefix
> (`project_semiring_parameterized_...`) unlike other BACKLOG
> entries (e.g. the existing semiring row uses
> `memory/project_semiring_parameterized_...`). Using the full
> `memory/...` path here avoids ambiguous references and makes
> the pointer unambiguous.

### Outcome

FIX — `memory/` prefix added to the memory pointer to match
the existing convention used at lines 7316 and 7409 of
`docs/BACKLOG.md`.

### Reply (verbatim)

> Fixed. Added the `memory/` prefix to the pointer
> (`memory/project_semiring_parameterized_zeta_regime_change_one_algebra_to_map_others_2026_04_22.md`)
> to match the convention used by the existing semiring rows
> at lines 7316 and 7409 of `docs/BACKLOG.md`. Resolved.

---

## Rebase summary

- Branch `backlog/cross-dsl-composability` rebased cleanly
on `origin/main` (no conflict markers, no cascade).
- Thread fixes landed as a single follow-up commit on top of
the rebase.

## Final state

- Unresolved threads: 0
- Auto-merge: armed (squash)
- Mergeable: MERGEABLE (pending CI re-run)
Loading