Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
34f8ef2
Roadmap DAG source lands in docs/ROADMAP-DAG.mmd
flyingrobots Nov 2, 2025
156fa6d
Docs: render ROADMAP DAG to SVG
flyingrobots Nov 2, 2025
3df7044
Docs: group Roadmap DAG by milestone (subgraphs)
flyingrobots Nov 2, 2025
3a9aa5a
Docs: colorize DAG by milestone; mark roots; hard vs soft edges
flyingrobots Nov 2, 2025
87fb754
Tools: add roadmap sweep to normalize milestones and embed dependencies
flyingrobots Nov 2, 2025
badb5cf
Planning: enrich ISSUES.md (Priority/Estimate) and add Appendix A chains
flyingrobots Nov 2, 2025
efa2ad1
Roadmap: use REST to set 'blocked by' issue dependencies in sweep
flyingrobots Nov 2, 2025
781443c
Org: CODEOWNERS + PR template; hooks/targets; risk pass; issue body b…
flyingrobots Nov 2, 2025
d291d6e
Submodule: add external/ledger-kernel (spec + schemas)
flyingrobots Nov 2, 2025
24c693d
Docs: add DRIFT_REPORT.md comparing roadmap to Ledger‑Kernel spec
flyingrobots Nov 2, 2025
49449b0
Compliance: add scaffolding (headers, stubs, meson) and artifact work…
flyingrobots Nov 2, 2025
01522cb
Sweep: treat Mermaid '-->' as hard dependency edges (not just '==>')
flyingrobots Nov 3, 2025
3584085
Submodule: remove floating branch; pin external/ledger-kernel to curr…
flyingrobots Nov 3, 2025
c367d3b
Docs: replace DRIFT_REPORT date placeholder with actual UTC timestamp
flyingrobots Nov 3, 2025
5610f1a
Feedback: YAML tidy, submodule pin, drift timestamp, robust hooks/Mak…
flyingrobots Nov 3, 2025
2e03635
Merge: resolve conflicts with origin/main (prefer enriched branch con…
flyingrobots Nov 3, 2025
dd660c8
Link the compliance smoke to its helper library; keep website artifac…
flyingrobots Nov 3, 2025
4a250e9
Roadmap/docs/build hygiene and compliance hardening\n\n- Docs: remove…
flyingrobots Nov 3, 2025
12561d6
DAG validator: detect hard-edge cycles and report a minimal cycle pat…
flyingrobots Nov 4, 2025
a45644e
Add FEEDBACK.md to git ignore
flyingrobots Nov 4, 2025
cc7c0fd
Address some feedback
flyingrobots Nov 4, 2025
6e49b02
Address FEEDBACK.md items with tests, code, docs, and CI clarificatio…
flyingrobots Nov 4, 2025
e0df337
FEEDBACK.md: mark 'Only reset summary fields for enabled runners' as …
flyingrobots Nov 4, 2025
a55be7d
Process new feedback: tighten compliance test, reset summary.core bef…
flyingrobots Nov 4, 2025
82c497f
Mark new FEEDBACK.md items with status+rationale; align notes with im…
flyingrobots Nov 4, 2025
14c1c56
Tell the truth in the header: report writer errors cover invalid inpu…
flyingrobots Nov 4, 2025
eda6093
Log: opened tracking issues for parity/polish items
flyingrobots Nov 4, 2025
b4611fe
compliance.h: extern C guard + precise NULL/error contracts for runne…
flyingrobots Nov 4, 2025
b57538f
Mark latest FEEDBACK.md items with status + rationale (docs, CI, head…
flyingrobots Nov 4, 2025
5e44179
Compliance header: clarify policy/wasm runner semantics (summary-only…
flyingrobots Nov 4, 2025
926beea
FEEDBACK.md: mark all items with status and rationale (header semanti…
flyingrobots Nov 4, 2025
9fe7662
Remove FEEDBACK.md from repo; add guardrails to prevent re-adding\n\n…
flyingrobots Nov 4, 2025
d86ae14
Clarify compliance API docs; finish core semantics; strengthen test
flyingrobots Nov 4, 2025
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
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Default code owner for the repo
# CODEOWNERS only supports GitHub handles; email added as a note.
* @flyingrobots # james@flyingrobots.dev

33 changes: 15 additions & 18 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
# Summary
## Summary

<!-- Briefly describe the change. Link the primary issue and milestone. -->
Describe the change and why it’s needed. Include links to related issues.

## Testing
## Checklist

- [ ] `cmake --build` (debug)
- [ ] `cmake --build` (release)
- [ ] `ctest`
- [ ] `meson compile` (debug)
- [ ] `meson compile` (release)
- [ ] `meson test`
- [ ] Additional checks (lint, docs, etc.):
- [ ] Tests added/updated
- [ ] Docs updated (README/docs/ISSUES/ROADMAP)
- [ ] ACTIVITY.log.jsonl entry added (`make log`) and `make activity-validate` passes
- [ ] Roadmap/DAG updated if dependencies changed (`make roadmap-validate`)
- [ ] Containerized targets used (no host builds), per AGENTS.md

## Deployment / Release Impact
## Acceptance Criteria

- [ ] No migration needed
- [ ] Docs updated
- [ ] Follow-up issues filed
- [ ] Builds green in CI matrix
- [ ] Lint/format passes (`make format-check`)
- [ ] Analyzer (optional) passes (`make analyze`)

## Reviewer Checklist
## Screenshots/Artifacts (if applicable)

## Notes

- [ ] Includes issue link (e.g., `Closes #123`)
- [ ] Tests cover new/changed behavior
- [ ] Dual-build CI expectations satisfied
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# The main CI build/tests do not require submodules; make this explicit.
submodules: false

- name: Install dependencies
run: |
Expand Down Expand Up @@ -101,6 +104,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: false

- name: Install dependencies
run: |
Expand All @@ -115,6 +120,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: false

- name: Install dependencies
run: |
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Compliance (artifact)

on:
workflow_dispatch: {}

permissions:
contents: read

jobs:
compliance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build (meson)
run: |
sudo apt-get update && sudo apt-get install -y ninja-build meson
meson setup meson-debug --buildtype debugoptimized
meson compile -C meson-debug
- name: Emit placeholder compliance report
run: |
cat > compliance.json <<'JSON'
{"implementation":"libgitledger","version":"0.0.0","date":"1970-01-01T00:00:00Z","results":[],"summary":{"core":"PARTIAL","policy":"N/A","wasm":"N/A"}}
JSON
- uses: actions/upload-artifact@v4
with:
name: compliance.json
path: compliance.json
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ compile_commands.json

# Project-specific
.obsidian/
website/.docusaurus/
website/node_modules/
FEEDBACK.md
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "external/ledger-kernel"]
path = external/ledger-kernel
url = https://github.com/flyingrobots/ledger-kernel
37 changes: 37 additions & 0 deletions ACTIVITY.log.jsonl

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ Thanks for helping build `libgitledger`! This document complements the roadmap a
- Maintain both build systems. Preferred: run the containerised make targets (`make cmake`, `make meson`, `make test-both`) so you exercise the same matrix CI runs. These jobs copy the repo into isolated workspaces, prepare sandbox Git fixtures, and remove all remotes before mutating anything.
- If you must run directly on the host checkout, export `I_KNOW_WHAT_I_AM_DOING=1` before invoking host targets. The makefile will otherwise abort unless it detects the container guard. Manual command sequences for CMake/Meson live in the README if you need to craft bespoke invocations.
- Align tooling: warning flags, optional dependencies, and targets must stay consistent across CMake and Meson.
- Submodules: initialise them before building tools that read the external spec.

```bash
git submodule update --init --recursive
# or
make bootstrap
```

- Install prerequisites (at minimum `libgit2` and `pkg-config`) before running host builds. Examples: `sudo apt-get install libgit2-dev pkg-config` or `brew install libgit2 pkg-config`.
- When adding dependencies, update both build descriptions and mention the change in the relevant issue.
- Run `make lint` (containerised clang-format + clang-tidy) before submitting a PR. CI enforces the same suite on GCC, Clang, and MSVC.
Expand Down
38 changes: 37 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.PHONY: all test cmake meson both test-cmake test-meson test-both clean format format-check tidy lint tidy-build \
host-cmake host-meson host-both host-test-cmake host-test-meson host-test-both \
host-format-check host-tidy host-lint sanitizers host-sanitizers analyze host-analyze \
activity-validate log hooks-install hooks-uninstall trophy symbols-check
activity-validate log hooks-install hooks-uninstall trophy symbols-check \
roadmap-render roadmap-sweep roadmap-validate roadmap-refresh

all: both

Expand Down Expand Up @@ -197,3 +198,38 @@ hooks-install:
hooks-uninstall:
@git config --unset core.hooksPath || true
@echo "hooks: unset core.hooksPath"

# Initialize submodules for fresh clones
bootstrap:
@git submodule update --init --recursive
# Roadmap helpers
PYTHON ?= python3

.PHONY: roadmap-render roadmap-sweep roadmap-validate roadmap-refresh

roadmap-render:
@if ! command -v docker >/dev/null 2>&1; then \
echo "docker is required for roadmap-render" >&2; exit 1; \
fi
@docker run --rm -v "$(PWD)/docs:/data" minlag/mermaid-cli -i /data/ROADMAP-DAG.mmd -o /data/ROADMAP-DAG.svg

roadmap-sweep:
@if ! command -v $(PYTHON) >/dev/null 2>&1; then \
echo "$(PYTHON) not found; cannot run roadmap-sweep" >&2; exit 1; \
fi
@if [ ! -f tools/roadmap/sweep_issues.py ]; then \
echo "tools/roadmap/sweep_issues.py not found" >&2; exit 1; \
fi
@$(PYTHON) tools/roadmap/sweep_issues.py

roadmap-validate:
@if ! command -v $(PYTHON) >/dev/null 2>&1; then \
echo "$(PYTHON) not found; cannot run roadmap-validate" >&2; exit 1; \
fi
@if [ ! -f tools/roadmap/validate_dag.py ]; then \
echo "tools/roadmap/validate_dag.py not found" >&2; exit 1; \
fi
@$(PYTHON) tools/roadmap/validate_dag.py

roadmap-refresh:
@$(MAKE) roadmap-validate && $(MAKE) roadmap-render
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ Early scaffolding for a Git-native ledger library built on top of `libgit2`.
- Issue drafts can be copied from `docs/ISSUE-DRAFTS.md`; regenerate with `python3 tools/automation/generate_issue_drafts.py` after editing the breakdown.
- Pull requests must follow `.github/pull_request_template.md` and exercise both build systems (CMake + Meson).
- See `CONTRIBUTING.md` for detailed workflow expectations.
- Submodules: this repo uses Git submodules (e.g., `external/ledger-kernel`). Clone with submodules or
initialise them after cloning:

```bash
git clone --recursive https://github.com/flyingrobots/libgitledger.git
# or, for an existing checkout
git submodule update --init --recursive
```
Skipping `--recursive` leaves `external/ledger-kernel/` empty and may break tools that read the spec.

- Quick bootstrap after cloning:

```bash
make bootstrap # runs: git submodule update --init --recursive
```
- Quickstart for contributors:
- Install repo hooks once: `make hooks-install` (pre-commit runs `make format-check` in containers like CI).
- Temporarily bypass the format gate for a commit: `SKIP_FORMAT_CHECK=1 git commit -m "..."`.
Expand Down
58 changes: 58 additions & 0 deletions docs/DRIFT_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Drift Report: libgitledger vs. Ledger‑Kernel Spec

Date: 2025-11-03T22:48:13Z

This report compares our current roadmap (issues + DAG) to the Ledger‑Kernel specification in `external/ledger-kernel`.

## Inputs

- Spec repository (submodule): `external/ledger-kernel`
- Schemas: `schemas/`
- Compliance: `docs/spec/compliance.md` (C‑1…C‑5 ↔ FS/M)
- Formal spec: `docs/spec/*.md` (FS‑1…FS‑14, M‑1…M‑9)
- Roadmap DAG: `docs/ROADMAP-DAG.mmd` (grouped by milestones)

## Mapping Summary

- FS‑10 (Canonical wire format + ID): PARTIAL
- Roadmap: No explicit issue yet; closest: [M4] libgit2 adapter (I/O), [M3] API docs.
- Gap: Add issue “Wire format canonicalization + BLAKE3 id (FS‑10)” under M3/M4.

- FS‑7/FS‑8 (Append-only + ref fast‑forward): PARTIAL
- Roadmap: Append path (#13), Append enforcement (#19), Policy enforcement tests (#20).
- Gap: Add explicit non‑FF ref rejection test issue.

- FS‑11 (Temporal ordering): PARTIAL
- Roadmap: Ledger lifecycle (#12) + Append/read integration tests (#15).
- Gap: Add validation test “reject child timestamp < parent”.

- FS‑3/FS‑9 (Deterministic policy evaluation): N/A (engine not yet present)
- Roadmap: Policy parser (#17), Policy storage (#16).
- Gap: Add “Deterministic policy eval harness” issue and seed vectors.

- FS‑6 (Offline verify end‑to‑end): PARTIAL
- Roadmap: End‑to‑end tests (#39).
- Gap: Add small offline replay vector + verifier entrypoint.

## Risks / Assumptions

- BLAKE3 dependency: We will vendor or link a minimal BLAKE3 for FS‑10.
- WASM policy runtime: Not required for core, mark as N/A until available.

## Recommendations

1. Create the following issues and link under milestones:
- [M3] FS‑10 Canonicalization + BLAKE3 id (core)
- [M2] Non‑FF ref rejection tests (FS‑7/FS‑8)
- [M2] Timestamp monotonicity validation (FS‑11)
- [M4] Deterministic policy evaluation harness (FS‑3/FS‑9)
- [M3] Offline verify minimal replay (FS‑6)
2. Add a compliance harness skeleton (report writer + CLI flag) and wire C‑1…C‑3 quickly; mark others N/A.
3. Add CI workflow `compliance.yml` in soft mode (artifact only); enable gating on core once C‑1…C‑3 are green.

## Next Steps (Implementation Plan)

- Include headers + source stubs under `include/ledger/` and `src/compliance/`.
- Add CLI flag `--compliance` (or a small utility) without impacting library ABI.
- Seed vectors in `tests/vectors/core/`.

Loading