Skip to content

refactor(shared): move statement kind patterns, requirements and periods into origin-shared - #114

Open
PiquelChips wants to merge 1 commit into
feat/events-watchfrom
feat/server-shared-policy
Open

PiquelChips wants to merge 1 commit into
feat/events-watchfrom
feat/server-shared-policy

Conversation

@PiquelChips

Copy link
Copy Markdown
Member

The HTTP API will show what landing on a target requires and take event filters by statement kind, so its clients need the same types the server reads policy.toml with.

Requirement, Principals and KindPattern move to a new origin_shared::policy module, and the periods retention rules are written in become origin_shared::Period. Nothing changes but their errors: a pattern or a principal set that doesn't parse is an InvalidName, and a period an InvalidPeriod, so RetentionError wraps them instead of formatting its own messages.

Note

Written by Claude Opus 5.5 in Claude Code (via T3 Code)

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 34 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 612062af-7042-47ba-9225-e49e4c50f55e
Commits

Reviewing files that changed from the base of the PR and between ee1a687 and a4152e3.

Files selected for processing: 10

  • apps/origin-src/src/cli.rs
  • apps/origin-src/src/events.rs
  • apps/origin-src/src/policy.rs
  • apps/origin-src/src/queue/mod.rs
  • apps/origin-src/src/queue/pending.rs
  • apps/origin-src/src/queue/session.rs
  • apps/origin-src/src/queue/tests/mod.rs
  • crates/origin-shared/src/lib.rs
  • crates/origin-shared/src/policy.rs
  • crates/origin-shared/src/text.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@PiquelChips
PiquelChips added this pull request to stack #165 November 22, 2026 14:59
@PiquelChips
PiquelChips force-pushed the feat/server-shared-policy branch 2 times, most recently from 84929da to 727b75e Compare November 22, 2026 18:54
…ods into origin-shared

The HTTP API will show what landing on a target requires and take event
filters by statement kind, so its clients need the same types the server
reads `policy.toml` with: `Requirement`, `Principals` and `KindPattern`,
and the periods retention rules are written in.

They move to `origin-shared`'s new `policy` module, and `Period` to its
`text` module, unchanged but for their errors: parsing a pattern or a
principal set now fails with `InvalidName`, and a period with
`InvalidPeriod`, so `RetentionError` wraps them instead of formatting
its own messages.
@PiquelChips
PiquelChips force-pushed the feat/server-shared-policy branch from 727b75e to a4152e3 Compare November 22, 2026 19:20
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