From 805691a71b5a1128618dbb1043e33e1c40fe70a4 Mon Sep 17 00:00:00 2001 From: Codex Date: Sat, 17 Oct 2026 16:20:12 +0200 Subject: [PATCH] docs: establish phase 0 evidence workflow --- .gitattributes | 7 ++ .gitignore | 16 +++ README.md | 36 +++++++ ...0001-public-private-repository-boundary.md | 30 ++++++ docs/collection/lightburn.md | 39 ++++++++ docs/data-handling.md | 33 +++++++ docs/project-charter.md | 29 ++++++ docs/research/installer-inventory.md | 23 +++++ docs/research/machine-profile.yaml | 40 ++++++++ schemas/artifact-manifest.schema.json | 59 +++++++++++ scripts/__init__.py | 1 + scripts/build_manifest.py | 99 +++++++++++++++++++ scripts/check_public_repo.py | 68 +++++++++++++ tests/test_build_manifest.py | 52 ++++++++++ tests/test_public_repo_guard.py | 41 ++++++++ 15 files changed, 573 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 README.md create mode 100644 docs/adr/0001-public-private-repository-boundary.md create mode 100644 docs/collection/lightburn.md create mode 100644 docs/data-handling.md create mode 100644 docs/project-charter.md create mode 100644 docs/research/installer-inventory.md create mode 100644 docs/research/machine-profile.yaml create mode 100644 schemas/artifact-manifest.schema.json create mode 100644 scripts/__init__.py create mode 100644 scripts/build_manifest.py create mode 100644 scripts/check_public_repo.py create mode 100644 tests/test_build_manifest.py create mode 100644 tests/test_public_repo_guard.py diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4084732 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +* text=auto +*.md text eol=lf +*.py text eol=lf +*.json text eol=lf +*.jsonl text eol=lf +*.yaml text eol=lf +*.yml text eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f74f096 --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +__pycache__/ +*.py[cod] +.pytest_cache/ +.venv/ +.uv-cache/ + +# Sensitive/raw acquisition data belongs in ThePirateRay-PrivateStash. +/raw/ +/private/ +*.lbprefs +*.lbzip +prefs.ini +prefs.old + +# Local reports are reproducible and must not be committed accidentally. +/reports/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..feabc53 --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +# The Pirate Ray + +The Pirate Ray is Makerspace Næstved's clean-room project for learning how to +interoperate with its laser equipment and, over time, building a safe desktop +control application. + +Phase 0 focuses on the **JPT 100 W E2/M7 MOPA** fiber laser with a JCZ/EZCAD2 +controller. It is deliberately limited to documentation and offline analysis: +no USB capture, framing, machine commands, or laser output. + +## Repository boundary + +This public repository contains source code, plans, decisions, tests, tools, +and sanitized research. Raw machine data, serial numbers, LightBurn exports, +and third-party material with unclear redistribution rights live in the +separate private `ThePirateRay-PrivateStash` repository. + +Start with: + +- [Project charter](docs/project-charter.md) +- [Data handling policy](docs/data-handling.md) +- [LightBurn collection checklist](docs/collection/lightburn.md) +- [Sanitized machine profile](docs/research/machine-profile.yaml) +- [Repository boundary decision](docs/adr/0001-public-private-repository-boundary.md) + +## Validation + +The repository uses only Python's standard library for Phase 0 tooling: + +```powershell +python -m unittest discover -s tests -v +python scripts/check_public_repo.py . +``` + +No project license has been selected yet. Until that decision is recorded, +the contents are not offered under an open-source license. diff --git a/docs/adr/0001-public-private-repository-boundary.md b/docs/adr/0001-public-private-repository-boundary.md new file mode 100644 index 0000000..65f5993 --- /dev/null +++ b/docs/adr/0001-public-private-repository-boundary.md @@ -0,0 +1,30 @@ +# ADR 0001: Public/private repository boundary + +- Status: Accepted +- Date: 2026-10-17 + +## Context + +The project needs unusually complete evidence while some inputs contain +identifiers, configuration secrets, or third-party files whose redistribution +rights are unclear. + +## Decision + +Use exactly two authoritative repositories. `ThePirateRay` is public and holds +all normal development work. `ThePirateRay-PrivateStash` holds sensitive raw +data and redistribution-restricted third-party material. Google Drive is used +only as a read-only acquisition source. + +Public documents cite private evidence by content-derived artifact ID and +SHA-256 digest. Git LFS is mandatory for binary files in PrivateStash. If the +Git server cannot store and retrieve LFS objects, raw binary import stops rather +than falling back to ordinary Git blobs. + +## Consequences + +- A public clone is useful without access to private evidence. +- Authorized researchers can reproduce claims from exact private bytes. +- Cross-repository commits must be ordered: private evidence first, sanitized + public analysis second. +- The two repositories must be validated separately. diff --git a/docs/collection/lightburn.md b/docs/collection/lightburn.md new file mode 100644 index 0000000..af19b1c --- /dev/null +++ b/docs/collection/lightburn.md @@ -0,0 +1,39 @@ +# LightBurn collection checklist + +Collect directly into a dated directory under +`ThePirateRay-PrivateStash/raw/lightburn/`. Do not use Google Drive as an +intermediate workspace. + +## Before collection + +- Confirm no marking job is active. +- Do not enable debug logging or generate Support Data. +- Record which lens is installed and whether LightBurn currently connects. + +## Required evidence + +| Directory | Evidence | +| --- | --- | +| `00-version/` | Screenshot of Help → About with exact version/build | +| `01-exports/` | Full `.lbzip` bundle and exported `.lbprefs` | +| `02-prefs/` | ZIP of `%LOCALAPPDATA%\LightBurn`, copied only after LightBurn is fully closed | +| `03-device-settings/` | Device list and every Device Settings tab for the JPT device | +| `04-projects/` | Two or three known-working `.lbrn2` files, including vector and MOPA/hatch examples when available | +| `05-hardware/` | Machine, source, controller, and active-lens labels; never open an energized enclosure | +| `06-context/` | Mounted lens, connection status, and normal startup/interlock notes | + +## Export procedure + +1. Use File → Bundles → Export Bundle and include every available component. +2. Use File → Preferences → Export Prefs. +3. Capture the UI screenshots and save existing example projects. +4. Exit LightBurn completely. +5. Copy `%LOCALAPPDATA%\LightBurn` into an archive without editing its contents. +6. Run the private manifest tool and review the staged files before committing. + +LightBurn documents bundles as containing settings, device profiles, hotkeys, +presets, and libraries. Since LightBurn 2.0, device export is also represented +as a bundle: . + +LightBurn explicitly warns not to publish generated Support Data: +