Skip to content

D-TGB-0/1: thought-git fixtures, oracle, signal checks and the slot pool - #1630

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

AdaWorldAPI merged 6 commits into
mainfrom
ccr-d3ce1263-ied9yh

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

This adds the pre-registration for thought git (D-TGB-0) and the slot pool (D-TGB-1) from thought-git-basics-v1.md (merged in #1629). Both live in a new lab probe, crates/thought-git-probe. It is its own workspace, excluded from the main one, and depends only on lance-graph-contract.

D-TGB-0: fixtures, from-scratch oracle, signal checks

  • Fixtures (src/fixtures.rs):
    • one write intention per Rubicon outcome;
    • a stack of unremarkable thoughts;
    • a contradiction against a given;
    • a divergent pair;
    • a regression scanpath;
    • a cold/hot surprise pair;
    • an unwritten lane.
  • Oracle (src/oracle.rs): computes the next version from scratch.
    • Only a Commit thought lands.
    • A given is never overwritten. An agreeing write is not stored; a different value is recorded as a contradiction.
    • If two thoughts in one version write different values to the same cell, nothing is stored and a divergence is recorded.
    • An unwritten cell reads as absent.
  • PREREGISTRATION.md: the falsifier, the disable and the fixture for D-TGB-1..10.

D-TGB-1: slot pool (src/slots.rs)

Operator decisions, 2026-10-20: "The easiest way in the beginning is Fifo vs pruning the least used lanes", then "Squashing if the least used are in a dependency chain".

branch takes a free slot. When all 63 are taken, the policy picks one candidate:

  • Eviction::Fifo picks the oldest;
  • Eviction::LeastUsed picks the one used least, with ties going to the oldest.

What happens to the candidate depends on its place in a dependency chain:

  • if it has a live parent, it is squashed into that parent;
  • else, if it has a live child, its oldest child is squashed into it;
  • only if it has neither is it evicted.

The parent the new thought branches from is never the candidate. free (used for squash, discard and land) returns a slot, and any children it had move to its parent. A handle carries its generation, so a stale handle is refused.

Tests (25)

  • 9 oracle tests, 10 signal tests and 6 slot tests.
  • Signal tests run on the real contract code. Each signal has a can-fire case and a can-stay-silent case: regressions, the cold/hot xor, the kanban routes, the MUL gate, and Gadamer.
  • Every rule has a disable, run after commit. Each turned the named test red and was then restored.
disable red test(s)
land every outcome only_commit_lands
store agreeing writes agreement_with_a_given_is_not_stored
overwrite the given a_different_value_for_a_given_is_refused_and_recorded
last writer wins divergence and squash tests
read missing as 0 absence test (plus two others)
ignore the slot generation stale-handle assertions in tests/slots.rs
LeastUsed keyed on age only least_used_evicts_the_idlest_root
evict instead of squashing a chain a_least_used_thought_in_a_chain_is_squashed_into_its_parent, a_candidate_with_a_child_absorbs_it
let the new thought's parent be the candidate branching_from_the_candidate_keeps_it

cargo test, cargo clippy --all-targets -- -D warnings and cargo fmt are clean, run from crates/thought-git-probe.

Plan notes added in this PR

  • Polyfill, never legacy.
  • Direct crate calls for internal timing.
  • The write path is Rust, not an API.
  • Folding datafrog through Quack (D-TGB-10).
  • What a landing writes into CE64 bits 59..63 (pearl, MUL, Gadamer).
  • The kanban planning vocabulary (D-TGB-9).
  • The MORK API surface (D-MPS-9), with the MORK licence state recorded as OPEN.
  • crepe (Soufflé-style) and ascent (datafrog+, lattices, BYODS, rayon) as candidate Datalog engines. Their role is still OPEN.

Not in this PR

The falsifiers for CE64 bits 59..63 on edges (pearl::hydrate, pearl::revise) need lance-graph-planner. They move to D-TGB-3.

Board

  • STATUS_BOARD: D-TGB-0 and D-TGB-1 are In PR.
  • Plan items are updated.
  • New entry: 2026-10-20-d-tgb-0-preregistration.md.
  • AGENT_LOG: today's Haiku runs.
  • The root Cargo.toml adds the probe to exclude.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f

New lab probe crates/thought-git-probe (own workspace, excluded; depends on
lance-graph-contract only). Fixtures: one write intention per Rubicon
outcome, an unremarkable stack, a contradiction, a divergent pair, a
regression scanpath, a cold/hot surprise and an unwritten lane. The oracle
computes the next version from scratch: only Commit lands, a given is never
overwritten (agreement not stored, a different value recorded as a
contradiction), a divergence inside one version stores nothing and is
recorded, and an unwritten cell reads as absent.

Signal checks run on the real contract code, each with a can-fire and a
can-stay-silent case: AlphaOverlay regressions, the AlphaMask cold/hot xor,
the kanban routes per outcome, the MUL gate, and GadamerRevision (replayed
material earns nothing; a second landing earns nothing; a preserved
contradiction holds the cycle). 19 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
PREREGISTRATION.md fixes the falsifier, disable and fixture for
D-TGB-1..10 and lists what stays OPEN (anomaly thresholds, which revision
kinds count, satisfactory, card granularity). The 59..63 falsifiers on
edges need lance-graph-planner and move to D-TGB-3; their Gadamer half is
pinned in this crate.

Board: STATUS_BOARD D-TGB-0 In PR; plan item checked; entry
2026-10-20-d-tgb-0-preregistration; AGENT_LOG for today's Haiku runs.

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

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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.

Operator decision (2026-10-20): focus on the important cases; at the
63-slot ceiling start with FIFO versus pruning the least-used lanes. The
earlier rule (squash unremarkable thoughts first, else refuse the branch)
is struck.

SlotPool in crates/thought-git-probe: branch takes a free slot or evicts
by policy, free returns it, and a handle carries its generation so an
evicted or freed handle is stale. Four tests: FIFO evicts the oldest,
LeastUsed the idlest (the two differ on one workload), an evicted handle
is stale, a freed slot is reused without eviction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
@AdaWorldAPI AdaWorldAPI changed the title D-TGB-0: thought-git fixtures, from-scratch oracle and signal checks D-TGB-0/1: thought-git fixtures, oracle, signal checks and the slot pool Oct 20, 2026
Operator (2026-10-20): squash if the least-used thoughts are in a
dependency chain. The pool records which live thought a branch came from
(its own bookkeeping, never W). At the ceiling the policy's candidate is
squashed into its live parent, or absorbs its live child; only a
chain-free candidate is evicted. The new thought's own parent is never the
candidate. Six slot tests.

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

Role (oracle, front end, or neither) stays OPEN; neither may execute set
operations beside the polyfill.

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 17:27
@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-20T17:30:14.991010Z 17537a3 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.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Add Carrot credits or activate Agent usage billing to use Autofix

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 17537a323a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +174 to +175
} else if let Some(child) = self.oldest_child(c) {
(child, c)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the branch parent out of chain squashing

When the pool is full and the policy selects a root whose oldest child is the from slot, this branch removes that very parent: for example, under FIFO with thought 1 parented to thought 0, branch(..., Some(thought_1_slot)) skips thought 1 as the candidate, selects thought 0, and then chooses thought 1 here as from and releases it. The call succeeds but unexpectedly makes the supplied parent handle stale, contrary to the registered invariant that a new thought's parent is never removed; child selection must also exclude keep, or a different candidate must be chosen.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed: reproduced with FIFO, thought 1 parented to thought 0, then branching from thought 1. The fix is 8b6b585, carried by #1631 because this PR was already merged.

When the candidate root's oldest child is the new thought's parent, the root is now squashed into that child. The child then takes the root's place in the tree, so its handle stays live.

Test: branching_from_the_candidates_child_keeps_the_child. It is red without the fix, and red again if the child does not take over the root's parent.


Generated by Claude Code

@AdaWorldAPI
AdaWorldAPI merged commit 010729b into main Oct 20, 2026
13 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Oct 20, 2026
Under pressure with a full pool, a root candidate was squashed with its
oldest child as the source. When that child was the new thought's parent,
the branch succeeded but the caller's parent handle went stale. The root
is now squashed into that child instead, and the child takes the root's
place in the tree. Found by review on #1630.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
AdaWorldAPI pushed a commit that referenced this pull request Oct 20, 2026
The full thought git API (thought-git-api-v1.md) is still a proposal.
crates/thought-git-probe implements the slot pool, the oracle and the
tests. It does not implement the production land, rebase or persistence
pipeline; D-TGB-2..5 stay Queued.

D-TGB-0 and D-TGB-1 merged with #1630/#1631, so their board rows now read
Shipped (lab) instead of In PR. The module doc no longer says that no
thought-git code exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
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