ZDDC/.gitignore
ZDDC e19667b5a2 test: add tests/data/test-archive.sh — synthetic ZDDC fixture builder
Generates a realistic ZDDC archive layout for end-to-end testing of
master + cache + mirror, with zero identifying data and a script
that creates and clears on demand.

Output: ~/zddc-test-data (default; override via TEST_ARCHIVE_DIR),
intentionally OUTSIDE the repo. Defensive .gitignore entries cover
in-repo redirects and the source-reference CSV (~/archive-export*.csv,
which the script never reads at runtime — distributions are baked in
here as constants extracted from a one-time inspection).

Layout mirrors a real archive's shape (project → Archive → party →
Received|Issued → dated transmittal folder → tracking-numbered file)
with synthetic codes throughout — Project-1/2/3, PartyA/B/C, FAC1-4,
lorem-ipsum titles, example.com emails. Disciplines, doc-type codes,
status codes (IFR/IFI/IFA/IFU/RSB), revision letters (A/B/0/0A/0B/C/D),
and tracking-number format are kept as-is — they're public ZDDC
convention vocabularies, not identifying data.

Each file's content is the metadata block:
  Tracking Number: <synthetic>
  Revision: <letter>
  Status: <code>
  Title: <lorem-ipsum>
rendered into the appropriate format per extension. Open any file and
verify it's the right one — md as a table, yaml as keys, html as a
styled table, .zddc as YAML, .zip with three views (md+yaml+html), pdf
rendered via docker.io/pandoc/latex (already-existing 563MB image)
through podman with --userns=keep-id so output is host-user-owned.
Falls back to a hand-rolled minimal valid PDF (Python stdlib only)
when podman or the pandoc image is unavailable.

Subcommands:
  build [--small]   Generate the fixture. --small produces ~12 files,
                    full produces ~550 with every one of the six
                    extensions (md/yaml/pdf/html/zddc/zip) guaranteed
                    in every transmittal.
  clear             rm -rf the fixture. Refuses unless target contains
                    a .zddc — defense against an accidental misconfigured
                    TEST_ARCHIVE_DIR pointing at something important.
  info              File count, total size, by-extension breakdown,
                    top-level layout. No content snippets.

POSIX sh (dash-compatible). Randomness via /dev/urandom (no $RANDOM;
dash doesn't expose it). Per-directory .zddc ACL configs use synthetic
emails from RFC-2606 example.com.

Verified: full fixture builds in ~3min (PDF generation dominates),
contains 144 PDFs all valid 1-page, no real-archive tokens leak
(grep -i for known sentinels from the source CSV returns zero hits).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 09:03:38 -05:00

53 lines
1.7 KiB
Text

tossme/
examples/
.env
.vscode
# Per-project Claude Code state (planning files, agent transcripts, etc.)
.claude/
# Session planning (never public)
PLAN.md
# Node dependencies
node_modules/
# Test report and results
playwright-report/
test-results/
# Build artifacts. dist/ is ignored everywhere: per-tool dist/<tool>.html
# is a transient build output (and the canonical thing tests open via
# file://), and dist/release-output/ is the local-only release bundle
# produced by `./build alpha|beta|release`, then rsync'd to the live
# site by `./deploy`. Nothing in dist/ should be committed.
#
# Hand-edited website content (index.html, reference.html, css/, js/,
# img/) lives in a SEPARATE Codeberg repo at codeberg.org/VARASYS/
# ZDDC-website, typically cloned at ~/src/zddc-website/. Release
# artifacts are NOT in git history at all — they're produced by this
# repo's build, rsync'd to /srv/zddc/releases/ on the deploy host,
# and reproducible from any <tool>-vX.Y.Z tag.
dist/
# Locally-compiled zddc-server binary. `(cd zddc && go build ./cmd/zddc-server)`
# drops the binary at zddc/zddc-server; the canonical released artifacts live
# under dist/release-output/zddc-server_* with platform suffixes and signing.
zddc/zddc-server
zddc/zddc-server.exe
# IDE and project files
.opencode/
opencode.json
package-lock.json
zddc-knowledge*.json
zddc-knowledge*.md
zddc-knowledge*.html
# tests/data/test-archive.sh fixture output. Default is ~/zddc-test-data
# (outside the repo); these patterns catch in-repo redirects via
# TEST_ARCHIVE_DIR. Defense in depth — the real-archive CSV reference
# at ~/archive-export*.csv must NEVER end up in the repo.
/zddc-test-data/
/tests/data/output/
/archive-export*.csv