Skip to content

D-TGB: replay is the API, the write is the Rubicon decision - #1629

Merged
AdaWorldAPI merged 24 commits into
mainfrom
ccr-d3ce1263-ied9yh
Oct 20, 2026
Merged

AdaWorldAPI merged 24 commits into
mainfrom
ccr-d3ce1263-ied9yh

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

This PR changes a plan and the board only; no code. It is based on main at d3fb285, after #1628.

What changes

Operator decision, 2026-10-20: one fold costs about 1.7 ns, so between 10⁶ and 10⁹ folds are cheaper than a single write. Most of thought git therefore runs in memory as an API, and writing to Lance is a deliberate decision. The new section is "Correction: replay is the API, the write is the Rubicon decision" in thought-git-basics-v1.md:

  1. Folds against a write. The operator puts one write at 233–350 ms. The figures measured in this repo:
    • a 1.7 ms write floor;
    • a LanceCycleWriter commit of 5.8–10.5 ms;
    • 336 ms for a Lance scan and 532 ms for a replay from Lance.
  2. 99.9 % of the operations run autonomously in memory: branch, write, diff, status, squash, discard and replay. None of them calls Lance.
  3. Squash stacks the unremarkable. A thought without anomalies is squashed onto the stack, and work continues on a new branch. The anomaly signals already exist in code:
    • contradiction records (givens_layer_probe);
    • regressions, i.e. visits > 1 (AlphaOverlay);
    • cold/hot surprise, i.e. a non-empty expected.xor(attended) (AlphaMask);
    • two thoughts reading one address differently (ThoughtTables::differs).
  4. The write is the Rubicon decision in Heckhausen's sense: a result is landed only when it is satisfactory. A kanban card tracks the intention to write, not the branch.
  5. Presence decides what is written. These rules are read from the code, not newly designed:
    • an absent lane is unknown (the NaN case), never zero;
    • agreement with a given is not stored;
    • a contradiction is recorded, never stored as a value;
    • RowDelta keeps only the slots that differ from the base.
  6. Rebase is replay of the receipt on the new base, so v1 needs no recursion driver.
  7. "Satisfactory" is decided by automated hypothesis testing. Each strategy runs as one branch on the same Sudoku fixture; jc compares and synthesizes the branches with statistics through an R-style API.
    • The engines run in parallel, one per crate. lance-graph-act-r, -metta, -nal, -relalg and -mask-risc exist; lance-graph-cog (Hyperon) and lance-graph-ona do not yet.
    • First come the different strategies on Sudoku, then the 115 rows of nal_inventory.tsv, run as MeTTa programs.
    • MeTTa runs the way PeTTa runs it: compiled to relational clauses, executed on datafrog instead of SWI-Prolog. ruff_metta_spo extracts each rule and classifies it against PeTTa's builtin registry. hyperon-experimental is optional.
  8. A separate table holds three things: the relations of relalg, Datalog and datafrog, the git metadata (PR entries), and the replay receipts.
    • Rows are keyed by (data dataset, data version, thought id), which links them to the kanban lane version. The data table and this table do not depend on each other's schema.
    • Relations take the measured D-MPS-8 layout, a versioned relationship table. MORK and PathMap stay disposable oracle indexes behind the Schnellverschluss.
    • This settles where a landed receipt lives (D-TGB-4) and the PR-record question in thought-git-api-v1.md.
    • Open: landing now writes two Lance versions, which are not atomic together. The working rule is to write the data first, then the metadata row. A missing metadata row is detected at replay, and D-TGB-3 gets a new falsifier for it.
  9. Thought git is a reusable API, and drivers sit outside it.
    • The API owns the verbs, the slot pool, the cells, the anomaly readings, the receipts and the metadata table. It never chooses what to do next.
    • A driver owns that policy and acts only through the verbs. The drivers named are:
      • ACT-R (arbitrate picks an intent from the candidates the API supplies);
      • graph-flow-kanban in rs-graph-llm (advances on mul::GateDecision);
      • ogar-loco.
    • Proposed placement: types in the contract, one implementation crate, each adapter with its driver.
  10. Orchestration runs in phases, and the stack under the API is fixed.
    • Phase 1 drives the API through ogar-loco / ActionDef; phase 2 drives it through ACT-R.
    • Under the API: datafrog > lance-graph-mask-risc (the RISC polyfill) > lance-graph-relalg > lance-graph-r2il. petgraph is optional, as a usability layer only.
    • lance-graph-supervisor runs in parallel; kanban_actor.rs is read only.
    • lance-graph-flow inherits the langgraph-style part of rs-graph-llm (graph-flow, Rig).
    • Later, not scheduled: OpenPsi for motivation (after a transcode), and MeTTa over lance-graph-mork for folding.
    • D-TGB-8 (new): the abstraction API. datafrog asks (derives the candidates), ACT-R chooses (arbitrate).
  11. Polyfill, never legacy. Everything the API executes runs on the polyfill stack. The plan names the legacy paths this rules out: AlphaTunnel's ten static rung lanes, the competing w_slot readers, the deleted kanban actor, the quarantined OutgoingHop gather, DataFusion, SWI-Prolog and the Hyperon interpreter as executors, and graph-flow session storage as a home for state. datafrog is lowered to the polyfill where it executes and stays the exact oracle for that lowering.

Consequences in the plan

  • D-TGB-1 (slot pool): branch now takes a slot without a decision, and squash, discard or land free it. At 63 slots, unremarkable thoughts are squashed first; if none is, branch is refused. The old rule "slot taken at the Rubicon crossing" is struck.

  • D-TGB-0 (fixtures): new fixtures for:

    • write intentions;
    • the squash stack;
    • each anomaly signal stopping the squash;
    • an unwritten lane reading as absent, not zero.

    The w_slot reference fixtures, left over from the withdrawn pointer reading, are struck.

  • D-TGB-7 (new): the reusable API plus the first driver. Its falsifier is driver independence: two drivers that make the same decisions produce byte-identical cells, receipts and metadata rows.

  • D-TGB-8 (new): the datafrog-asks / ACT-R-chooses abstraction API.

  • Open questions added:

    • the anomaly predicate and its thresholds;
    • the jc statistic and its threshold for "satisfactory";
    • the jc R-style interface;
    • the name of the implementation crate.
  • Board:

    • STATUS_BOARD rows D-TGB-0, D-TGB-1, D-TGB-7 and D-TGB-8;
    • a new board entry, 2026-10-20-thought-git-replay-api-write-rubicon;
    • the entries index, regenerated (387 rows);
    • the supersession index, regenerated: the plan cites the REUSE ruling on GateDecision.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f

Operator decision (2026-10-20): one fold costs about 1.7 ns, so 10^6 to
10^9 folds are cheaper than one write. 99.9 % of the thought git
operations (branch, write, diff, status, squash, discard, replay) are
autonomous in-memory heuristics. A thought without anomaly is squashed
onto the stack and work continues on a new branch. Landing into Lance is
the conscious Heckhausen Rubicon decision, taken when the result is
satisfactory.

Read against the implementation (alpha.rs, alpha_tunnel.rs,
givens_layer_probe, thought_layers_probe, split-tunnel doc): the anomaly
signals already exist (contradiction records, visits > 1, cold/hot
surprise, divergence between thoughts), and presence decides what is
written (an absent lane is unknown, never zero; agreement is not stored).

- thought-git-basics-v1.md: new correction section; ideal-state item 1,
  D-TGB-0 and D-TGB-1 re-specified (the slot is no longer taken at the
  Rubicon crossing, and the w_slot reference fixtures are struck);
  Open gains the anomaly predicate and "satisfactory".
- Rebase is replay of the receipt, so v1 needs no recursion driver.
- STATUS_BOARD D-TGB-0/1, a new board entry, index regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4b01c933-ba2c-4917-beb4-509a326d00d1
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

claude added 23 commits October 20, 2026 14:26
Operator decision (2026-10-20): what counts as a satisfactory result is
decided by automated hypothesis testing. Each strategy runs as one
branch on the same Sudoku fixture; jc provides the statistics through an
R-style API; the engines run in parallel, one per crate. First the
strategies on Sudoku, then the 115 rows of nal_inventory.tsv as MeTTa
programs.

In the workspace today: lance-graph-act-r, -metta, -nal, -relalg,
-mask-risc and jc. Not yet: lance-graph-cog (Hyperon), lance-graph-ona.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
Operator decision (2026-10-20): relalg / Datalog / datafrog relations,
the git metadata (PR entries) and the thought-replay receipts live in
one table separate from the data table, so neither depends on the
other's schema. Rows are keyed by (data dataset, data version, thought
id), which links them to the kanban lane's version.

This settles the receipt home (D-TGB-4) and the PR-record question in
thought-git-api-v1.md. Open, and stated in the plan: landing then writes
two Lance versions that are not atomic together; working rule is data
first, then the metadata row, with a missing row detected at replay
(new D-TGB-3 falsifier).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
Operator decision (2026-10-20): MeTTa is executed the PeTTa way,
compiled to relational clauses, with datafrog instead of SWI-Prolog as
the engine. ruff_metta_spo is the extractor: it parses with the Hyperon
parser and classifies every rule head under PeTTa's builtin registry.
hyperon-experimental is optional, for the rules that stay
interpreter-only and as a cross-check.

Cites the metta-polyfill-v1 measurements (join_10000: PeTTa 1.47 s,
datafrog 0.51-0.62 ms, Hyperon does not finish).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
Operator, 2026-10-20: relationships are stored as tries via PathMap and
MORK behind the Schnellverschluss. The relation part of the separate
table takes the measured D-MPS-8 layout (versioned relationship table,
shared-variable domain, per-side presence planes and generations), with
MORK and PathMap as disposable oracle indexes. Not admitted until the
D-RMAP-1 BIND review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
…oco as drivers

Operator decision (2026-10-20): focus on git, and structure it so it
lands as a reusable API. ACT-R may drive the kanban; ogar-loco and
rs-graph-llm (langgraph-style) are the alternatives.

New section "The reusable git API and its drivers":
- the API owns the verbs, slot pool, presence/sparse cells, anomaly
  readings, receipts and the metadata table, and never chooses what to
  do next;
- a driver owns the policy and calls only the verbs. ACT-R's arbitrate
  picks an intent from candidates the API supplies; graph-flow-kanban
  advances on mul::GateDecision (the REUSE gate, cited); ogar-loco
  calls the same verbs. lance-graph-flow is not a crate;
- placement (PROPOSAL): types in lance-graph-contract, one
  implementation crate, adapters with their drivers.

New D-TGB-7 with a driver-independence falsifier. Supersession index
regenerated (GateDecision citing-plan count 29 -> 30).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
… read-only

Operator, 2026-10-20: lance-graph-supervisor runs in parallel, with
kanban_actor.rs read-only. Read the same day: kanban_actor.rs holds only
PhaseCensus, mul_target and parse_kanban_step (the actor and its RPCs
are deleted); phases advance only through cycle_driver (#879), one WAL
write and one DatasetVersion per cycle, at most one sealed transition
per owner.

In the plan: the git API reads the census and never messages a phase;
land rides the cycle as the owner's paired move, coalesced into the
cycle's single version (D-TGB-3); cycle_driver's pre-commit
regeneration is the same rule as rebase-as-replay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
…nd the stack below

Operator decision (2026-10-20): the thought git API is orchestrated in
phases. Phase 1 drives the verbs from an ogar-loco program or an OGAR
ActionDef; phase 2 drives them abstractly through ACT-R. Below the API:
datafrog, then the RISC arithmetic polyfill (mask-risc), relalg and
r2il. A petgraph API is an optional usability layer, as in
relstore-quack-petgraph-traversal-v1.md.

D-TGB-7's first driver and its driver-independence falsifier now follow
the phases; STATUS_BOARD row updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
…-graph-llm

Operator decision (2026-10-20): the lance-graph-flow crate inherits the
LangGraph-style part of rs-graph-llm (graph-flow: stateful graphs,
sessions, pauses, NextAction) and the LangChain-style part (Rig behind
graph-flow-lance's llm::Completion). With them it inherits the seam
rules of graph-flow-lance: one lance-abi handle with a generation
crosses, no data in a Context, sessions fail closed on a newer source
generation. Not inherited: session storage as a home for state.

As a git driver it calls the API's verbs from graph tasks. The crate
does not exist yet; the older prompt line "extend graph-flow-lance
before introducing lance-graph-flow" is superseded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
…r possibilities

Operator, 2026-10-20: OpenPsi may take the motivation part after a
transcode; MeTTa over lance-graph-mork eventually for folding. Recorded
with the constraints already in the repo: D-SAG-3 treats OpenPsi as an
architectural reference with a known tie-breaking defect, and moving MORK
source in is blocked by its missing licence (D-MPS-7).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
Operator preference (2026-10-20): datafrog and ACT-R should form the
abstraction API. Proposed shape: questions about thoughts are Datalog
rules over the metadata table, run by datafrog; decisions are ACT-R
Candidates evaluated against one snapshot, answered with one witnessed
intent drawn from the verbs. The verbs stay the concrete layer (phase 1,
ogar-loco / ActionDef); the abstraction sits above them.

New D-TGB-8 with two falsifiers (rule answers equal a direct scan;
recorded intents replayed as verb calls reproduce the run) and a disable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
Operator decision (2026-10-20): everything the thought git API executes
runs on the polyfill stack (mask-risc over ndarray::simd, relalg, r2il);
no verb, rule or driver wraps or falls back to a legacy path. The plan
names the legacy paths it rules out: AlphaTunnel's static rung lanes,
the competing w_slot readers, the deleted kanban actor, the quarantined
OutgoingHop gather, DataFusion, SWI-Prolog / the Hyperon interpreter as
executors, and graph-flow session storage as state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
Operator decision (2026-10-20): addressing the crates directly is fine
for now. First runs call act-r, datafrog, relalg, mask-risc, metta and
nal directly; the verb trait stays the target and they move behind it
once it exists. The driver-independence falsifier starts with the trait;
until then a run is checked against the datafrog oracle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
Operator decision (2026-10-20): kanban later gets a fast planning API
(D-TGB-9). Its vocabulary is left open; fixed is that planning questions
are Quack-shaped folds (Filter -> mask, Agg fold, lowered to mask-risc),
with PhaseCensus as the precedent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
Operator decisions (2026-10-20): direct crate calls are for internal
timing (runtime), not schedule. The write path is concrete Rust, not an
API, still triggered by a kanban card and leaving its receipt in the
metadata table. datafrog optimisation: the measured Semijoin lowering
rests on gather, forbidden since 2026-10-16; the allowed route is H14d's
four stages. Recursion stays on datafrog until D-MTP-3. New D-TGB-10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
D-TGB-9 and D-TGB-10 had been inserted between D-TGB-8 and its sub-items,
so D-TGB-8's falsifier read as D-TGB-10's. Each item now has its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
Operator (2026-10-20): MORK's MIT decision is already confirmed on the
board. D-MPS-7 moves from OPEN to DECIDED; the thought-git plan drops the
licence blocker on MeTTa over lance-graph-mork. The upstream LICENSE file
(PR #148) was unmerged at the last check, recorded beside the decision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
…tes contradiction from revision

Operator pointer (2026-10-20). Working model read from the code: the
landed result is EpistemicState5 (59..63), moved by pearl::hydrate
(topology only) and pearl::revise (certification only, never lowered).
The contract's MUL kanban gate decides whether a write crosses the
Rubicon. GadamerRevision separates ContradictionPreserved from
HorizonFusion by a new independent root, so a replayed receipt can never
raise certification. Falsifiers added for D-TGB-0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
D-MPS-7's source is trueagi-io/MORK issue #2, where Adam-Vandervorst
wrote on 2025-05-21: "Yes! It's now under MIT." PR #148 follows up on
it and is still unmerged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
Operator correction (2026-10-20): MORK's maintainer stated MIT intent
(issue #2), but repository-level clearance is incomplete: PR #148 (LICENSE
file and manifest metadata, proposed 2026-08-20) was still open on
2026-10-19. PathMap already advertises MIT. "DECIDED: MIT" is struck;
vendoring MORK source waits for the clearance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
Operator (2026-10-20): the licence gate is about used code. An independent
implementation checked against our own tests and oracles is not blocked;
"openmork" was named as a further option (not located yet).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
Operator (2026-10-20): MORK sits behind the Schnellverschluss for the
licence reason. MORK is fetched, never vendored; only boundary.rs names
it; removal is one Index variant, two helpers and one Cargo.toml line;
the native D-MPS-8 arm answers the same join without MORK code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
…(D-MPS-9)

Operator decision (2026-10-20): MORK is not rewritten. Its public Space
verbs (add_sexpr, remove_sexpr, query_multi, transform_multi_multi,
dump_sexpr) become the API shape; our folding answers them; MORK stays
the differential oracle behind the Schnellverschluss. First scope:
fixed-arity shared-variable patterns; other shapes refused by name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 20, 2026 15:48
@AdaWorldAPI
AdaWorldAPI merged commit a7c9c6e into main Oct 20, 2026
5 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T15:49:05.985081Z 9120978 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants