Skip to content

Add sets: print every label for one record in one PDF - #6

Open
mgilardi wants to merge 5 commits into
co/labels-sheetsfrom
co/labels-sets
Open

mgilardi wants to merge 5 commits into
co/labels-sheetsfrom
co/labels-sets

Conversation

@mgilardi

Copy link
Copy Markdown
Contributor

Adds a label-sets collection (same scope and access rules as templates) and a set option on the print endpoint: steps reach records self, forward (relationship path) or backward (records pointing at the current one), and can chain. Every record is read as the person; an unreadable record or cross-site reference refuses the whole run; the 2,000-label cap counts the whole set; one PDF and one log entry per run. Also corrects the design: tubes carry the manufacturer's label, and our labels go on the kit bag, kit box, shipping box and lab batch (dated entry in docs/decisions.md).

Tests: 62 pass (8 new) on in-memory MongoDB with made-up data. Not tested: polymorphic backward steps, very large steps, a real kits plugin, SQL databases, a set dialog.

Captive Origins task: K6. Follows: D5009 (owner, 2026-11-16).

🤖 Generated with Claude Code

mgilardi and others added 5 commits November 16, 2026 09:46
The owner decided sets reach records both ways and live in their own
collection. A label-sets collection has the same scope and access rules as
templates; steps reach records self, forward or backward and can chain. The
print endpoint takes set and a starting id, reads every record as the person,
refuses the whole run on any unreadable record or cross-site reference, applies
the 2,000 cap across the set and writes one log entry. The design's tube
example is corrected: tubes carry the manufacturer's label.

Tested: 8 new tests on in-memory MongoDB with made-up data (62 total).
Not tested: polymorphic backward steps, very large steps, a real kits plugin,
SQL databases, a dialog for sets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Typecheck only; tests are unchanged (62 pass).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Typecheck only; tests are unchanged (62 pass).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Typecheck only; tests are unchanged (62 pass).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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