Documentation

Docs / Reference

ADR 0080 - Public tree guard and licence checks

Status: Accepted (delegated review, 2026-11-20)

Context

Graphvein goes public as a new repository with a fresh history, started from a snapshot of this repository (the project owner's decision for launch 1). The private repository keeps internal material that must not enter the public tree: the handoff notes for the reviewing assistant, task records, research, the internal plan, the CI budget notes, profiling records with developer machine details, and the internal agent instructions. Until the launch, development continues here, so the split has to hold for every later snapshot and every push to the public remote, not only once.

Two further things block a public release:

Options considered

  1. Filter the history (git filter-repo) and publish this repository. Keeps history but every past commit would need review for internal content; rejected by the fresh-history decision.
  2. Ignore rules only (a .gitignore-like list in the public repository). Ignore rules do not stop a tracked file or a force-add, so they guard nothing on their own.
  3. An explicit exclusion list with a snapshot tool, a tree check and a push guard (chosen). The list is data, read by three small scripts; tests prove the snapshot passes the check and that the check fails on each kind of leak.

For licences:

  1. Rely on the web build's notice file (third-party-licenses.txt) only. It covers the npm packages, shadcn/ui, the Go standard library and the logos, but no Go module and no grammar.
  2. A Go generator with a reviewed table and an allowlist (chosen), run as a test: offline, deterministic, on every platform CI uses.
  3. An external licence scanner. A new dependency and network access in CI; rejected.

Decision

Public contract tables. Claim contract tables and census data that tests read live in docs/contract/claims/ and docs/contract/claims/data/. The tables are verbatim copies of the contract sections of the task records; the census files moved there unchanged. Every test checks the same rows as before.

Public tree guard.

Licences. scripts/notices (go run ./scripts/notices) writes THIRD_PARTY_NOTICES from the modules linked into cmd/graphvein for linux, darwin and windows (go list with GOPROXY=off), the asset table of grammars/NOTICES.md and the runtime packages and bundled build tools of web/package-lock.json. It reproduces the Go module and grammar licence files verbatim and points to the web UI's own notice file for npm licence texts. The allowlist is Apache-2.0 (also WITH LLVM-exception), MIT, MIT-0, BSD-2-Clause, BSD-3-Clause, ISC, 0BSD, Unlicense, CC0-1.0, Python-2.0, Zlib, blessing (SQLite's public domain dedication) and MPL-2.0 (with a note: file-level copyleft). Every Go module has a reviewed licence expression; the classifier must find each licence file's licence in it. A new module, a licence outside the list, an unrecognised licence file or a stale THIRD_PARTY_NOTICES fails TestThirdPartyNotices. Reviewed exceptions name an exact version and an ADR (elkjs 0.12.0, ADR 0046).

Notices in the binary. internal/server/ui embeds copies of NOTICE and THIRD_PARTY_NOTICES (legal/, written by scripts/notices, kept equal to the originals by TestLegalCopies); the server serves them at /NOTICE.txt and /THIRD_PARTY_NOTICES.txt next to the web UI's /third-party-licenses.txt. Release archives ship LICENSE, NOTICE and THIRD_PARTY_NOTICES next to the binary.

Editor logos stay under their owners' terms; NOTICE and web/src/assets/editor-logos/README.md exclude them from the Apache License.

Consequences

Known gaps

Review notes (2026-11-20)

Revision 1 (2026-11-26): export and import between the repositories ("Model B′")

Status: Accepted (delegated review, 2026-11-26)

The original decision above stays accepted; this revision adds the workflow after the launch.

Context

The launch decision started the public repository from a snapshot, but it left open how later work gets there. The project owner decided: this repository stays the maintainer's working repository; the public repository receives each finished task as one commit on a branch export/<task-id> with a pull request; contributor pull requests happen in the public repository and are imported here with their author kept; releases, tags and provenance attestations are built only by the public repository's CI from public commits. Every export is a new chance to leak private material, and the existing guard checks private paths and record names but not personal details, developer paths or private corpus names.

Options considered

  1. Push the working repository's history (filtered per push). Every commit and message would need review; rejected with the fresh history.
  2. Cherry-pick task commits onto the public branch. Commits that touch private and public paths together would need splitting, and the public tree could drift from the snapshot without anyone noticing.
  3. One snapshot commit per task (chosen): the public tree is always the snapshot of the working repository's main, checked before the commit and compared after the merge.

Decision

Consequences

Known gaps

Review notes (2026-11-26)

Report a problem with this pageSource: docs/adr/0080-public-tree-and-licence-checks.md