OXYGENHUB
# ec2cfb379e70 oxygen / docs / plan.md
7.4 KiB · Markdown · last changed Plan: tick amend into older changes and split 1 month ago renderedsource blame history raw

Overnight work plan

Each loop iteration: pick the first unchecked item, implement it with tests, run the gated checks, commit with oxy, tick the box here with a one-line note, and commit again. Update docs/spec.md (and its changelog) whenever behaviour the spec describes changes. If an item cannot be finished in two iterations, note why under it and move on.

Rules

  • Never run git init in this directory or push this project anywhere. Oxygen tracks itself with target/release/oxy.
  • Never modify ~/development/tetriblox; use only mirror clones in the scratch directory.
  • Tests must stay hermetic (hermetic() / OXY_HOME); never touch ~/.config/oxy.
  • Gate every commit on cargo test --workspace exit status and a clean cargo clippy --workspace --all-targets.
  • No new external services, no publishing, no artifacts.

Items

  • Checkpoints (spec §11) — done 2026-09-27 00:05. At 5,002 changes: status 0.10 s → 0.03 s, commit 0.20 s → 0.05 s; checkpoint write 0.10 s, payload 1.7 MB; states now hold change metadata only. serialize a State to a checkpoint object, load the nearest checkpoint in load_state and replay only the difference, create one automatically every core.checkpoint-interval changes (default 256) and on demand (oxy checkpoint). Benchmark before/after on a 5,000-change synthetic repository and record the numbers here.
  • Pack merging (spec §13.4) — done 2026-09-27 00:05; folds packs into one above 16, also after auto-pack. merge packs when more than 16 exist; oxy gc reports it.
  • Modern CLI presentation (user request, 2026-09-26 23:20) — done 2026-09-27 00:05 via src/cli/ui.rs (console + indicatif): colour, spinners on long commands, --plain, NO_COLOR and non-TTY detection; status/log/show/commit/checkout/verify/sync/gc restyled. colour and bold for ids, paths, and statuses; a live spinner or updating status line while a command works (snapshot, fetch, push, import, gc); indented, grouped output like Claude Code's. Use console/indicatif or equivalent; detect a TTY and honour NO_COLOR and --no-color/--plain so pipes and scripts get plain text; keep --json where it exists. Touch every command's output for consistency.
  • Shell prompt integration (user request, 2026-09-26 23:30) — done 2026-09-27 00:05: oxy prompt [--format], manifest-based dirty check (<10 ms), ahead/behind from tracking, docs/prompt.md with bash/oh-my-bash/zsh snippets. oxy prompt prints a compact one-line summary for shell prompts in a few milliseconds and with no side effects (no snapshot operation recorded, no locks): bookmark, working-copy ChangeId prefix, head count, a dirty marker (compare the file system against the working copy cheaply: sizes and mtimes first, content only when they differ), conflict marker, and ahead/behind counts against remotes/origin/<bookmark> when known. Provide docs/prompt.md with an oh-my-bash/bash snippet (oxy_prompt_info function, silent outside an oxy repository, colours via --plain off) and a zsh variant. Format flags: --format with placeholders, --plain.
  • (Pending) The user's second request in the same message was cut off after "Can we also look at"; ask them to complete it in the morning.
  • Lazy blobs and the objects endpoint — done 2026-09-27 00:45: clone --max-blob, filter.max-blob, .oxy/lazy/<ref> registry, fetch on first read (checkout, export), server objects route; status/commit need no blobs. (spec §13.5, §16.1, §17): clone --max-blob SIZE, absent blobs recorded with their remote, fetched on first read; server endpoint; wire encoding in spec §16.3.
  • Sparse checkout (spec §17) — done 2026-09-27 01:05: filter.paths, clone --sparse (sets max-blob 0), oxy sparse PATH.., snapshot/checkout/prompt honour scope; out-of-scope blobs never fetched. filter.paths in config, clone --sparse PATH.., status/commit/checkout honour it.
  • Shallow clone (spec §17) — done 2026-09-27 01:50: clone --depth N takes the remote's checkpoint plus N levels of history, .oxy/shallow boundary, negotiation and imports tolerate it, oxy deepen; log works from checkpoint metadata. clone --depth N, shallow boundary with a checkpoint, oxy deepen.
  • Tags (spec §10.1, §14.4) — done 2026-09-27 02:25: oxy tag create|list, checkout by tag, tag attestations, tags in views/refs/push, refused when existing with another state, policy rule tags/<name>, Git export as tags. oxy tag create|list, tag attestations, tags in views, wire, and export.
  • Multiple workspaces (spec §12.2) — done 2026-09-27 02:55: oxy workspace add|list|forget, secondary workspaces via a .oxy file, per-workspace manifest and snapshot lock with stale takeover. oxy workspace add|list|forget, per-workspace directory metadata, snapshot lock.
  • .oxyattributes (spec §19) — done 2026-09-27 03:25: gitattributes-style rules; binary/text, eol=lf|crlf (LF stored, CRLF on checkout), nocompress chunks packed raw, lockable read-only until oxy lock; attributes taken from the files being committed. binary, eol=lf|crlf, nocompress, lockable (advisory locally).
  • Hooks (spec §20) — done 2026-09-27 03:55: executables in .oxy/hooks/<event>, JSON on stdin, pre-* veto via exit status with stderr as the message, semantic-deps adds explicit deps when hooks.semantic-deps = true. pre-commit, post-commit, pre-push, post-fetch, post-checkout, and the semantic-deps hook with its JSON interface.
  • Amend on non-head changes; oxy split — done 2026-09-27 04:45: oxy amend --into CHANGE appends the working copy's edits to an older change when they reference only its closure (identity correspondence for dependents, refused otherwise with a clear message); oxy split CHANGE PATH.. rebuilds a head as two changes. Found and fixed a graph bug: a delete/insert conflict now requires the deleter and inserter to commute (both directions).
  • Reify orphaned references on rewrite as conflicts instead of refusing (spec §8.4); define the conflict shape in the spec.
  • Identity lifecycle: oxy identity rotate|revoke, expiry, delegates (oxy identity delegate add|remove), multi-signer policy updates.
  • Rename detection on Git import (similarity ≥ 50%); oxy git fetch/push against a Git remote via a mirror.
  • Hardening: property tests for the CBOR decoder and pack reader against random and mutated inputs; a concurrent-push test against the server; a 1 GB single-file benchmark for chunking and blobs.
  • Documentation: docs/guide.md (user guide by task) and docs/protocol.md (for other implementers, derived from spec §16 and the wire encodings).
  • Spec review pass: resolve or re-word every "MAY ... until" allowance introduced during implementation, and close what can be closed in §27.

Log

  • 2026-09-26 23:01 plan created.
  • 2026-09-27 04:45 iteration 9: amend --into and split; graph delete/insert fix. 104 tests.
  • 2026-09-27 03:55 iteration 8: hooks. 102 tests.
  • 2026-09-27 03:25 iteration 7: .oxyattributes. 101 tests.
  • 2026-09-27 02:55 iteration 6: multiple workspaces. 97 tests.
  • 2026-09-27 02:25 iteration 5: tags. 96 tests.
  • 2026-09-27 01:50 iteration 4: shallow clone and deepen. 95 tests.
  • 2026-09-27 01:05 iteration 3: sparse checkout. 94 tests.
  • 2026-09-27 00:45 iteration 2: lazy blobs and objects endpoint. 93 tests.
  • 2026-09-27 00:05 iteration 1: checkpoints, pack merging, CLI presentation, shell prompt. 91 tests.