feat: roar tag add/rm/show/history (Phase 1 — local storage)#214
Open
jongeyer wants to merge 3 commits into
Open
feat: roar tag add/rm/show/history (Phase 1 — local storage)#214jongeyer wants to merge 3 commits into
jongeyer wants to merge 3 commits into
Conversation
Implements `roar tag add | rm | show | history` for hereditary compliance tags, as specified in the 2026-05-19 audit design doc (Phase 1, local-only). Tags live under the `tag.*` key inside the existing versioned label documents (no schema changes — the labels table already exists). Each kind stores a JSON array with set semantics; duplicates are silently ignored on `add`. New code: roar/core/label_constants.py — TAG_NAMESPACE + CANONICAL_TAG_KINDS roar/application/tags.py — TagService: set-accumulation over tag.* roar/application/query/tag.py — thin orchestration (matches label.py pattern) roar/application/query/requests.py — TagAdd/Rm/Show/HistoryRequest DTOs roar/application/query/__init__.py — lazy exports for the four tag functions roar/cli/commands/tag.py — Click group with add/rm/show/history roar/cli/commands/__init__.py — registers `tag` in the command registry tests/unit/test_tag_service.py — 25 tests for TagService logic tests/application/query/test_tag.py — 16 tests for query orchestration 39/39 tests pass. Deferred: tag propagation at job-record time, --add-tag/--block-tag on roar run, and GLaaS sync (tags publish automatically via the existing collect_label_sync_payloads path on roar register). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fixes 5 ruff errors caught by CI: I001 (x2): unsorted import blocks F401: unused `call` import SIM117 (x2): nested with statements Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
roar tagcommand group with four subcommands:add,rm,show,historytag.*key in the existing versioned label documents (no schema changes)addlicense,contains_pii,jurisdiction,classification,special_categoryNew files
roar/core/label_constants.pyTAG_NAMESPACE+CANONICAL_TAG_KINDSconstantsroar/application/tags.pyTagService— set-accumulation read-modify-write overtag.*roar/application/query/tag.pylabel.py)roar/application/query/requests.pyTagAdd/Rm/Show/HistoryRequestDTOsroar/cli/commands/tag.pyadd/rm/show/historysubcommandstests/unit/test_tag_service.pyTagServiceset-accumulation logictests/application/query/test_tag.pyTest plan
python -m pytest tests/unit/test_tag_service.py tests/application/query/test_tag.py— 39/39 passroar tag add license=MIT @1against a real roar projectDeferred (Phase 2)
tag.*from input artifacts to outputs)--add-tag/--block-tagflags onroar run/roar registercollect_label_sync_payloads)