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
81 changes: 81 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Quality

on:
pull_request:
branches:
- main
workflow_dispatch:

permissions:
contents: read

concurrency:
group: quality-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
tests:
name: Tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out source
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 20
package-manager-cache: false
- name: Run repository checks
run: npm run check

fallow:
name: Fallow changed-code
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out full history
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 20
package-manager-cache: false
- name: Install pinned Fallow
run: npm install --global fallow@2.89.0
- name: Enforce changed-code quality gate
env:
FALLOW_AGENT_SOURCE: codex
run: |
fallow audit \
--base "origin/${{ github.base_ref }}" \
--gate new-only \
--format json \
--quiet \
--explain \
> fallow-audit.json 2>/dev/null || true
jq '{verdict, attribution, summary}' fallow-audit.json
jq -e '.kind == "audit" and .verdict == "pass"' fallow-audit.json >/dev/null

package:
name: Package dry-run
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out source
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 20
package-manager-cache: false
- name: Validate package contents
run: |
npm pack --dry-run --json > package-dry-run.json
jq '.[0] | {id, size, unpackedSize, entryCount}' package-dry-run.json
jq -e '
length == 1 and
([.[0].files[].path | select(test("forgejo|change-request-provider"; "i"))] | length == 0)
' package-dry-run.json >/dev/null
25 changes: 14 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,24 @@ All notable changes to Tabellio are recorded here.

### Added

- Provider-neutral exact-commit validation runner with committed argv manifests and no shell execution.
- GitHub-bound exact-commit validation runner with committed argv manifests and no shell execution.
- Bounded SHA-256 output evidence, detached worktree cleanup, and durable results on `refs/tabellio/validations`.
- Local validation results integrated into durable review readiness.
- Git-native JSON ledger on compare-and-swap refs for durable control-plane state.
- Durable review cycles covering Forgejo feedback, provider-neutral agent findings, triage, checks, fixes, and readiness.
- Durable review cycles covering GitHub feedback, agent findings, triage, checks, fixes, and readiness.
- Dry-run-first, atomic review-cycle migration from legacy v0.1 identities and PR numbers to GitHub-only v0.2 state.
- Entire-checkpoint-bound fix records with commit remapping across git-spice restacks.
- Approval-gated git-spice submit, update, sync, restack, and merge operations.
- Integrity-bound operation intents, short-lived approvals, one-use receipts, and branch-set race checks.
- File-backed Forgejo API and Git HTTPS authentication without credentials in remote URLs or command arguments.
- Read-only Forgejo provider for repository, pull request, review, comment, and commit-status reads.
- Disposable localhost Forgejo 15.0.3 lab with idempotent bootstrap and seeded integration fixture.
- `tabellio-forge` CLI with file-backed or environment-backed token loading and redacted failures.
- File-backed GitHub API and Git HTTPS authentication without credentials in remote URLs or command arguments.
- Read-only GitHub provider for repository, pull request, review, comment, commit-status, and check-run reads.
- Mandatory-by-default Entire ledger provider with metadata-only checkpoint export and context binding.
- Provider-neutral `tabellio-ledger/v0.1` schema, CLI, validator, example, and tests.
- Read-only git-spice stack adapter with provider-neutral `tabellio-stack/v0.1` snapshots.
- GitHub workflow `tabellio-ledger/v0.1` schema, CLI, validator, example, and tests.
- Read-only git-spice stack adapter with GitHub workflow `tabellio-stack/v0.1` snapshots.
- Stack snapshot schema, validator, CLI, example, and adapter tests.
- Local agent-run CLI with start, checkpoint, finish, status, and safe promotion commands.
- Mutable `tabellio-run/v0.1` local state contract and end-to-end lifecycle artifacts.
- Provider-neutral `RepositoryStore` contract and standard Git provider.
- `RepositoryStore` contract and standard Git implementation for the GitHub workflow.
- Bare-repository, contained-worktree, Git-note, merge-preview, and compare-and-swap primitives.
- Integrity-protected `tabellio-context/v0.1` packet and CLI capture/check commands.
- Optional evidence-to-context commit binding.
Expand All @@ -34,9 +33,11 @@ All notable changes to Tabellio are recorded here.

### Fixed

- Removed 15 unused public exports and consolidated provider subprocess handling; inherited Fallow dead-code findings dropped from 49 to 34 without deleting runtime interface methods.
- Evidence artifact self-integrity now has an explicit canonical hash scope.
- Handwritten policy validators now require approval booleans, unique action IDs, and non-empty forbidden side effects.
- Runtime context validation now matches schema property boundaries.
- Review sync ignores exact-commit validations belonging to a different repository identity.
- Pull request CI now runs the Tabellio unit suite and records the source head commit.
- Merge preview uses structured output so diagnostic words in file paths remain intact.
- Context serialization rejects undefined fields and impossible object-ID lengths.
Expand All @@ -46,7 +47,9 @@ All notable changes to Tabellio are recorded here.

### Changed

- Replaced Graphite as the planned stacked-review integration with host-agnostic git-spice.
- Standardized stacked GitHub pull requests on git-spice.
- Made GitHub `origin` the canonical code store and thin pull-request shell while keeping agent control state external.
- Rejected publication or fetching of review, validation, and Entire control refs through the code-storage remote.

## 0.1.0 - 2026-07-08

Expand All @@ -62,7 +65,7 @@ Initial public release.
- Minimal valid evidence fixture.
- OpenSSF Scorecard workflow.
- Research grounding, schema reference, and workflow model docs.
- Agentic tooling stack guide covering Code Storage, Entire, Graphite, GitHub, Codex, and Tabellio boundaries.
- Agentic tooling stack guide covering Entire, GitHub, Codex, and Tabellio boundaries.

### Release Gates

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ Before tagging a release:
- run local checks
- run an exact-head `tabellio-validate` pass
- confirm the durable review cycle is ready
- tag from a clean canonical Forgejo `main` commit
- tag from a clean `origin/main` commit
31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
![Tabellio product overview](docs/assets/tabellio-hero.svg)

[![Node.js](https://img.shields.io/badge/Node.js-%3E%3D20-339933?logo=node.js&logoColor=white)](https://nodejs.org/)
[![Forgejo](https://img.shields.io/badge/Forgejo-canonical%20forge-FB923C?logo=forgejo&logoColor=white)](https://forgejo.org/)
[![GitHub](https://img.shields.io/badge/GitHub-code%20storage-181717?logo=github)](https://github.com/)
[![JSON Schema](https://img.shields.io/badge/JSON%20Schema-evidence%20contract-0B6BFF)](https://json-schema.org/)
[![SARIF](https://img.shields.io/badge/SARIF-code%20scanning-2563EB)](https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html)
[![git-spice](https://img.shields.io/badge/git--spice-stacked%20review-B45309)](https://abhinav.github.io/git-spice/)
[![Entire](https://img.shields.io/badge/Entire-checkpoint%20ledger-111827)](https://entire.io/)
[![License](https://img.shields.io/badge/license-Apache--2.0-green)](LICENSE)

Provider-neutral Git context and evidence for agentic development.
GitHub-native context and evidence for agentic development.

Tabellio gives coding agents a deterministic Git foundation: standard Git repositories, isolated worktrees, immutable commit IDs, merge previews, compare-and-swap ref updates, and context packets tied to the exact diff. Forgejo is the canonical review adapter. Any Git remote may store code; no GitHub API or hosted workflow runtime is required.
Tabellio gives coding agents a deterministic Git foundation: standard Git repositories, isolated worktrees, immutable commit IDs, merge previews, compare-and-swap ref updates, and context packets tied to the exact diff. GitHub stores code and provides a thin pull-request shell. Tabellio keeps agent transcripts, review state, validation results, and control refs outside that public code-storage boundary.

## What It Adds

Expand All @@ -36,7 +36,7 @@ The native engine runs through the installed `git` executable. It never construc
| Component | Role |
| --- | --- |
| `GitProcess` | Executes argument arrays with prompts disabled and typed failures |
| `RepositoryStore` | Provider-neutral repository contract |
| `RepositoryStore` | Repository contract for Tabellio's GitHub-backed workflow |
| `NativeGitStore` | Reads commits and diffs, manages worktrees, previews merges, and updates refs safely |
| `WorkspaceManager` | Gives each agent run a contained worktree path |
| Context packet | Binds task, actor, exact commits, changed files, checkpoints, and merge status |
Expand All @@ -60,31 +60,30 @@ AI-assisted pull requests should not depend on reviewer trust alone. Tabellio gi
| Runtime | [Node.js 20+](https://nodejs.org/) | Runs the local writer and validators |
| Validation | `tabellio-validate` on any trusted worker | Runs an exact committed command manifest and stores results on a Git ref |
| Evidence contract | [JSON Schema](https://json-schema.org/) | Validates the evidence envelope and external-action policy |
| Review surface | [Forgejo](https://forgejo.org/) | Hosts repositories, change requests, comments, reviews, and commit status |
| Stacked review | [git-spice](https://abhinav.github.io/git-spice/) | Host-agnostic stack engine for small dependent change requests |
| Code storage | [GitHub](https://github.com/) | Stores code refs and tags; provides a thin pull-request shell |
| Stacked review | [git-spice](https://abhinav.github.io/git-spice/) | Stack engine for small dependent GitHub pull requests |
| Checkpoint ledger | [Entire](https://entire.io/) and [Entire CLI](https://github.com/entireio/cli) | Required default for agent session and checkpoint context |
| Git substrate | Standard Git CLI, bare repositories, and worktrees | Stores repositories, branches, commits, patches, and agent-created code state |
| Agent review | [OpenAI Codex](https://openai.com/codex/) | Produces provider-neutral findings imported into the durable review ledger |
| Agent review | [OpenAI Codex](https://openai.com/codex/) | Produces findings imported into the durable GitHub review ledger |
| Prior art | [SLSA](https://slsa.dev/) and [in-toto](https://in-toto.io/) | Inspiration for provenance and supply-chain evidence, without a compliance claim |

The current public origin may remain a code-storage mirror during migration. It is not a runtime dependency. Entire is the required checkpoint ledger; git-spice manages stacks; Forgejo hosts review; Tabellio owns validation and durable control refs.
`origin` is the canonical GitHub code remote. Entire is the required checkpoint ledger; git-spice manages stacks; Tabellio owns validation and durable review state. Private control refs are external state and are rejected when their destination is `origin`.

## Core Files

| Path | Purpose |
| --- | --- |
| `tabellio.platform.json` | Canonical forge, stack, ledger, validation, review, and control-ref contract |
| `tabellio.platform.json` | Code-storage boundary, stack, ledger, validation, review, and control-ref contract |
| `schemas/` | Evidence and external-action JSON schemas |
| `scripts/providers/native-git-store.mjs` | Standard Git storage provider |
| `scripts/providers/git-spice-stack-manager.mjs` | Read-only git-spice stack adapter |
| `scripts/providers/git-spice-operations.mjs` | Approval-gated git-spice submit, update, sync, restack, and merge adapter |
| `scripts/providers/entire-ledger-provider.mjs` | Metadata-only Entire checkpoint adapter |
| `scripts/providers/forgejo-provider.mjs` | Read-only Forgejo repository and review adapter |
| `scripts/providers/github-provider.mjs` | Read-only GitHub pull-request, review, comment, status, and check adapter |
| `scripts/lib/git-json-ledger.mjs` | Versioned, compare-and-swap JSON state on standard Git refs |
| `scripts/lib/review-cycle.mjs` | Durable forge and agent review/fix state machine |
| `scripts/lib/review-cycle.mjs` | Durable GitHub and agent review/fix state machine |
| `scripts/lib/validation-runner.mjs` | Exact-commit, shell-free validation with bounded evidence logs |
| `scripts/lib/control-ref-transport.mjs` | Approval-gated, fast-forward-only sharing of review, validation, and Entire refs |
| `infra/forgejo/` | Disposable localhost Forgejo integration lab |
| `scripts/lib/` | Git process, repository contract, worktree, and context primitives |
| `scripts/` | Dependency-free capture, writer, and validators |
| `examples/` | Minimal valid context, evidence, review, validation, stack, and ledger fixtures |
Expand All @@ -102,7 +101,7 @@ npm run tabellio:platform:check
node scripts/tabellio-validate.mjs run --repo . --commit HEAD --manifest tabellio.validation.json
```

Configure `TABELLIO_FORGE_URL`, `TABELLIO_FORGE_API_URL`, and `TABELLIO_FORGE_TOKEN_FILE` for Forgejo operations. Tokens stay in owner-readable files and never enter remote URLs or command arguments.
Keep `origin` limited to ordinary code branches and tags. Configure a separate private GitHub repository under another remote name before publishing control refs. The transport refuses to target `origin`.

Validate the bundled fixture:

Expand All @@ -119,7 +118,7 @@ node scripts/check-tabellio-evidence-envelope.mjs --evidence tabellio-pr-evidenc
node scripts/check-tabellio-external-actions.mjs --evidence tabellio-pr-evidence.json
```

Capture provider-neutral context first, then bind evidence to it:
Capture GitHub-bound context first, then bind evidence to it:

```bash
node scripts/capture-tabellio-context.mjs \
Expand Down Expand Up @@ -166,7 +165,6 @@ npm run tabellio:review:example:check
npm run tabellio:validate:example:check
npm run tabellio:ledger -- --repo . --repo-id IntelIP/Tabellio --base main --head HEAD --out tabellio-ledger.json
npm run tabellio:ledger:check
npm run tabellio:forge -- version --base-url http://127.0.0.1:3300 --token-file .tabellio/forgejo/credentials/admin-token
npm run tabellio:context:capture
npm run tabellio:context:check
npm run tabellio:evidence:write
Expand All @@ -193,10 +191,11 @@ The external-action checker fails when an action is marked `attempted: true` wit

- [Getting started](docs/getting-started.md)
- [Agentic tooling stack](docs/tooling-stack.md)
- [GitHub code-storage boundary](docs/github-code-storage-boundary.md)
- [Agent run lifecycle](docs/agent-run-lifecycle.md)
- [Approved stack operations](docs/stack-operations.md)
- [Durable review and fix loop](docs/review-loop.md)
- [Provider-neutral validation](docs/validation-runner.md)
- [Exact-commit validation](docs/validation-runner.md)
- [Operations hardening](docs/operations-hardening.md)
- [Workflow model](docs/workflow-model.md)
- [Native Git foundation](docs/native-git-foundation.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/codex-review.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Codex Review

Codex review is a provider-neutral review producer. It inspects the diff and evidence, then emits `tabellio-agent-review/v0.1` for the durable review cycle. It does not replace deterministic checks.
Codex review inspects the GitHub pull-request diff and evidence, then emits `tabellio-agent-review/v0.1` for the durable review cycle. It does not replace deterministic checks.

## Local Preflight

Run review against the exact Forgejo change-request head:
Run review against the exact GitHub pull-request head:

```bash
CODEX_HOME=/tmp/codex-review-home codex review --base main
Expand Down
Loading