Skip to content

✨ feat(cli): add --namespace / -N flag to data-access commands#383

Merged
sodre merged 1 commit into
mainfrom
feat/368-namespace-cli
Feb 14, 2026
Merged

✨ feat(cli): add --namespace / -N flag to data-access commands#383
sodre merged 1 commit into
mainfrom
feat/368-namespace-cli

Conversation

@sodre

@sodre sodre commented Feb 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Add --namespace / -N flag to all 17 data-access CLI commands across entity, resource, system, audit, and usage groups
  • When a non-default namespace is provided, scopes the repository via repo.namespace() before executing business logic
  • Implements a namespace_option decorator and _resolve_namespace helper for DRY application across commands
  • Default namespace ($default) is a no-op for backward compatibility

Test plan

  • 11 unit tests covering each command group + short flag -N
  • 100% diff coverage on changed lines
  • All 2338 existing unit tests pass

Closes #368

🤖 Generated with Claude Code

Add namespace scoping to all CLI data-access commands (entity, resource,
system, audit, usage groups). When a non-default namespace is provided,
the repository is scoped via repo.namespace() before executing business
logic. Default namespace skips the call for backward compatibility.

- Add namespace_option decorator and _resolve_namespace helper for DRY
- Apply to all 17 data-access commands across 5 command groups
- Add 11 unit tests covering each group + short flag -N

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sodre sodre added this to the v0.10.0 milestone Feb 14, 2026
@sodre sodre added the area/cli Command line interface label Feb 14, 2026
@codecov

codecov Bot commented Feb 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.86%. Comparing base (d808008) to head (8a98db7).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #383      +/-   ##
==========================================
+ Coverage   91.82%   91.86%   +0.04%     
==========================================
  Files          33       33              
  Lines        7385     7426      +41     
==========================================
+ Hits         6781     6822      +41     
  Misses        604      604              
Flag Coverage Δ
doctest 26.98% <0.00%> (-0.15%) ⬇️
e2e 40.57% <61.90%> (-0.54%) ⬇️
integration 49.27% <85.71%> (+0.18%) ⬆️
unit 91.61% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sodre sodre marked this pull request as ready for review February 14, 2026 19:27
@sodre sodre merged commit e5cd385 into main Feb 14, 2026
25 checks passed
@sodre sodre deleted the feat/368-namespace-cli branch February 14, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli Command line interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Add --namespace flag to CLI data-access commands

1 participant