# Development progress

This document is the source of truth for the local code status. A design
statement is not evidence that a feature is implemented.

## Current snapshot

The preserved baseline contains 53 real development commits from 2026-09-20
through 2026-09-22. The formal `main` branch now also contains the reviewed
submission-readiness PR. The active Issue #8 branch now includes the in-memory
graph foundation and a file-backed WAL transaction/recovery path:

- typed IDs and scalar property values;
- structured error categories;
- node and directed-edge CRUD;
- adjacency, label, edge-type, and equality indexes;
- strict/cascade node deletion;
- detached-candidate single-writer transactions;
- atomic commit publication and rollback;
- versioned WAL v1 framing, deterministic encoding, CRC32/ISO-HDLC checks, and
  corruption/truncation classification;
- sequential WAL scanning after a snapshot boundary, including duplicate/gap
  detection, validation of complete truncated headers, and final-tail handling;
- deterministic WAL operation encoding for every current graph mutation;
- file-backed `Database::init(path)` / `Database::open(path)` and one advisory
  exclusive writer lock;
- async commit that appends and synchronizes one record before publishing;
- sequential replay, derived-index rebuilding, incomplete-tail repair, and
  recovery-required handling for ambiguous append/sync errors;
- directory metadata synchronization after initialization and WAL-tail repair;
- 51 passing native tests and a runnable in-memory example.

All current commit author and committer metadata belongs to `dtzrttp`.

## Verification evidence

The current local toolchain is Moon `0.1.20260920` / `moonc`
`0.10.14+7d59c7ec9`; the official updates page lists `moonc v0.10.14` dated
2026-09-21 as the newest release checked on 2026-09-29.
The following commands pass locally on the native target:

```text
moon update
moon check --target native
moon test --target native   # 50 passed
moon build --target native
moon fmt --check
moon info --target native
git diff --check
```

The required native check, test, formatter and interface-generation commands
pass locally. MoonBit reports existing implicit Eq/Debug promotion warnings;
the Windows C compiler also reports an `EINVAL` macro redefinition inside the
upstream async dependency. `moon ide doc` fails in this installation because
it has no backend metadata, so `async/fs` signatures were checked against the
installed package's generated `.mbti` and source. The intentional public
interface changes are `Database::init`, `Database::open`, and async
`WriteTransaction::commit`; WAL record and decode-result types remain private.

The first hosted run showed that a fresh GitHub runner must refresh its Moon
registry index before resolving the new dependency. CI now runs `moon update`
before `moon check`; the same update and check succeed locally. Both hosted
push and pull-request CI runs pass with this setup.

## Planned v0.1 work

Snapshots/checkpoints, WAL compaction, the bounded query pipeline, full CLI,
JSONL import/export, and the complete dependency-graph demo are not
implemented. The WAL is loaded fully into memory on open and currently must be
smaller than 2 GiB. The advisory lock only coordinates cooperating processes
using `moonbitlang/async`. Snapshot recovery and injected append/sync failure
tests remain open work.

## Repository tracking note

The code history was reconstructed into the formal public repository without
changing its final tree or commit messages. The formal repository now has the
`v0.1` milestone and Issues #1 through #15 for the approved work breakdown.
Historical PRs are not fabricated: future pull requests must represent real
branch changes and include implementation evidence, tests, and limitations.
