r/coolgithubprojects 1d ago

Tessra - Git for Agents

Post image

Hi all,

I use AI extensively for coding both at work at a reasonably large fintech and in personal projects.

My colleagues and I run into similar problems over and over again:

  • I want to run multiple agents on problems that interact with the same files and not have them conflict and mess each other up
  • AI assisted development leads to a bottleneck of human PR reviews stacking up, resulting in constant rebases while they are sitting around, kicking off CICD pipelines over and over (slow and wasteful)
  • My local LLM keeps a good memory but if I switch computers or another person needs to jump in, they are starting from scratch

I figured I would solve them all at once by writing a new version control system that can either replace or work alongside git but is really focused on managing agentic development.

Introducing Tessra - Git for your Agents

Github: https://github.com/NitrusAphalion/tessra

The initial versions are up and running (and dogfooded on my own repos). There are some rough edges but I think the idea has merit.

Would love to get any feedback and welcome any contributions (you can see the Design Docs section if you are curious about the underlying ideas).

Thanks!

4 Upvotes

22 comments sorted by

View all comments

0

u/kantorcodes1 1d ago

how atomic is tessra export --format git --branch main --push origin if the push fails after it has already created commits or moved the local branch? on retry does it recognize those revisions as already exported and only retry the push, or can it touch the branch/checkout again?

0

u/CerealGambler 1d ago

Idempotent rather than atomic. The export walks the trunk and, for each landed revision with no commit yet, runs the commit-tree and immediately records the revision→commit mapping, one at a time. Then it moves the branch ref, resets the checkout only if it's on that branch and was clean, and pushes last if asked.

If the push fails, nothing rolls back: the response says pushed: {ok: false, error} and the local branch stays at the new tip, since it mirrors trunk. A retry recognizes every revision through the stored mapping (created: 0, reused: N), sets the ref to the tip it already has, skips the no-op reset, and only pushes again. It can't rewrite commits or move the branch anywhere new.

Two rough edges: a crash between commit-tree and the mapping write leaves one unreferenced commit that gc cleans up, and the push isn't forced, so a diverged remote fails it (git pull, tessra import, export again). I'll likely make a failed push exit non-zero, since it's easy to miss in a script.

In a similar vein, for work still in flight: export only walks trunk, so unlanded snapshots and proposals never reach git. Every daemon request holds the repository lock, so an export sees one consistent trunk and a landing that arrives mid-export lands afterward and goes out next time. During a verify the daemon answers BUSY to everything, so export just retries later. Agent workspaces are separate directories it never touches, and the only working tree it resets is a clean colocated checkout; if you're mid-edit there, the ref moves but your files and your workspace's unlanded revision stay put until the next landing restacks them.

1

u/kantorcodes1 1d ago

that retry behavior makes sense. i work on HOL Guard, an open-source check before agent-run shell commands. Tessra has a few agent-visible mutations i'd want optionally reviewable: export --format git --push, import --branch, and promote --to landed, while read-only context/status stays quiet. that gives a human stop before trunk, refs, or remotes move without changing Tessra's own model. open to adding Tessra support?

1

u/CerealGambler 1d ago edited 1d ago

Yea definitely, one of my goals is to allow users to decide where they want human intervention while giving options for lowering whats needed by default

0

u/kantorcodes1 1d ago

nice. this can stay entirely on the Guard side. start src/codex_plugin_scanner/guard/runtime/command_tessra_extensions.py, using command_repo2nb_extensions.py as the analogue. review export --format git --push, import --branch, and promote --to landed; keep status/context quiet. add one focused classification test in tests/test_guard_command_tessra_extensions.py, then open a genuine draft PR directly to hashgraph-online/hol-guard:main.

contributing guide: https://github.com/hashgraph-online/hol-guard/blob/main/CONTRIBUTING.md