Skip to content

Add nullius release: export a public code snapshot with pinned bookkeeping - #51

Merged
fkguo merged 2 commits into
mainfrom
claude/nullius-release-command
Aug 7, 2026
Merged

Add nullius release: export a public code snapshot with pinned bookkeeping#51
fkguo merged 2 commits into
mainfrom
claude/nullius-release-command

Conversation

@fkguo

@fkguo fkguo commented Aug 7, 2026

Copy link
Copy Markdown
Owner

What

A small front-door command completing the result-traceability lane's public-release story: nullius release <target-dir> [--commit <sha>] [--tag <name>] [--actor <who>] [--dry-run] exports the project's CODE at a chosen commit into an empty directory outside the project root, so it can seed a public repository whose history starts clean at version one — while the internal repository keeps the full history and the public↔internal mapping is pinned twice (a local public-vN tag on the exported commit + a decisions-ledger entry carrying the full commit id).

Design intent: the version object stays the git commit (traceability D1). This is a one-shot export, never a second maintained "clean copy" that could drift.

Behavior

  • Defaults to HEAD and requires a clean tree; --commit names any exact revision (including a run's snapshot commit) — the export is the commit's content, never the working tree's.
  • Fixed exclusion list (run artifacts, team/runs, machine state, host-agent dirs, internal process files); the receipt prints which entries were actually present in the exported tree — nothing is dropped silently. export-ignore/export-subst attributes are a hard refusal (git archive honors them, which would break exactly that transparency contract); both tree-committed and $GIT_DIR/info/attributes sources are detected.
  • Symlink-safe containment: the target's nearest existing ancestor is canonicalized before the outside-the-project check.
  • Failure ordering: uninitialized project and invalid tag names refuse BEFORE any export work; a tag or ledger failure after export reports honestly what completed and exits nonzero.
  • --dry-run previews commit, tag, and exclusions with zero writes.
  • CLI surfaces synced: help, command inventory, front-door authority map, orchestrator README capability list (which also gains the lane's trace/current/result), and the three synced README/QUICKSTART instruction blocks.

Review record

Two seats, both read-only on pinned trees: codex (different family) r1 CHANGES_NEEDED with 4 blocking + 1 non-blocking; host-native seat r1 SHIP with 7 non-blocking (three converging with codex's blockings). All 11 findings dispositioned — fixed in bc60d55 with a regression fixture each. codex r2 confirmation: SHIP, zero new findings, all five dispositions verified. Six hardening guards mutation-verified (M8–M13) on top of the original seven (M1–M7): reverting any single guard turns exactly one test red. 14 command tests; full orchestrator suite 820 passed; all anti-drift locks and codegen check green.

FK Guo added 2 commits August 7, 2026 13:59
…inned bookkeeping

New front-door command: export the project's code at a chosen commit into
an empty directory outside the project root, so it can seed a public
repository whose history starts clean at version one while the internal
repository keeps the full history.

- Defaults to HEAD and requires a clean tree; --commit names any exact
  revision (including a run's snapshot commit) and skips that check —
  the export is the commit's content, never the working tree's.
- Fixed exclusion list (run artifacts, team/runs, machine state,
  host-agent dirs, internal process files); the receipt prints which
  entries were actually present in the exported tree — nothing is
  dropped silently.
- The exported commit gets a local public-vN tag (auto-incremented,
  collision refuses, never moved) and the release is recorded on the
  decisions ledger, pinning the public-version-to-internal-revision
  mapping twice. A ledger failure after export+tag reports honestly
  with the manual repair command and exits nonzero.
- Refuses non-empty targets and targets nested inside the project root;
  --dry-run previews commit, tag, and exclusions without writing.
- CLI surfaces synced: help, command inventory, front-door authority
  map, README + zh README + QUICKSTART instruction blocks.
- Seven tests, each mutation-verified (exclusion drop, dirty-ok,
  nonempty-ok, nesting-ok, tag-collision-ok, dry-run-real,
  ledger-failure-swallowed all turn exactly one test red).
…per dual review

codex r1 (4 blocking) + native seat r1 (SHIP, 7 non-blocking; three
converge with codex's findings). All dispositions:

- symlink-safe containment: the target's nearest existing ancestor is
  canonicalized before the outside-the-project check, so a symlinked
  target or symlinked parent can no longer smuggle the export back into
  the repository (codex #1 / native #2; two fixtures)
- export-ignore/export-subst attributes are a hard refusal: git archive
  honors them, which would let the same commit silently omit or rewrite
  files beyond the fixed printed list — breaking the transparency
  contract. Both tree-committed and $GIT_DIR/info/attributes sources
  are detected (codex #2 / native #1; two fixtures)
- the ledger pins the FULL commit id (tag and ledger are now independent
  pins); short forms are display-only (codex #3)
- a custom --tag is validated with git check-ref-format BEFORE any
  export work, and a tag failure after export reports honestly what
  completed (codex #4 / native #4)
- uninitialized projects are refused up front instead of after export
  and tag (native #3); the ledger-failure fixture now injects the
  failure past preflight (decisions.jsonl as a directory)
- excludedPresentInTree uses NUL-delimited ls-tree so non-ASCII names
  are never quote-mangled into receipt under-reporting (native #5;
  fixture isolates the prefix on a non-ASCII-only name)
- test gaps closed: artifacts.jl near-miss retention, --actor on the
  ledger record, custom-tag success path (native #6); header comment
  matches actual receipt behavior (native #7); parse-layer test for
  release options (codex #5); orchestrator README capability list
  gains trace/current/result/release (codex #5)

Mutations M8-M13: each fix reverted turns exactly one test red.
Full suite 820 passed.
@cursor

cursor Bot commented Aug 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@fkguo
fkguo merged commit 79d7e28 into main Aug 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant