Skip to content

feat: Foundry unlocks — PolicyRewriter trait, DomainProfile, verb taxonomy seam#281

Merged
AdaWorldAPI merged 3 commits into
claude/foundry-fixes-r2-2026-04-29from
claude/foundry-unlocks-r2-2026-04-29
Apr 29, 2026
Merged

feat: Foundry unlocks — PolicyRewriter trait, DomainProfile, verb taxonomy seam#281
AdaWorldAPI merged 3 commits into
claude/foundry-fixes-r2-2026-04-29from
claude/foundry-unlocks-r2-2026-04-29

Conversation

@AdaWorldAPI
Copy link
Copy Markdown
Owner

Summary

Implements epiphanies E1 and E5 from PR #278 outlook review. Stacks on top of claude/foundry-fixes-r2-2026-04-29.

  • E1 — PolicyRewriter trait. Generalized OptimizerRule framework: PolicyKind (RowFilter / ColumnMask / RowEncryption / DifferentialPrivacy / Audit), PolicyRewriter trait, ColumnMaskRewriter as concrete impl (skeleton — UDF wrap is follow-up). ColumnMaskRegistry + RedactionMode (Null / Constant / Hash / Truncate). RowEncryptionPolicy + DifferentialPrivacyPolicy stubs.
  • E5 — DomainProfile. StepDomain::profile() returns per-domain orchestration profile: audit_retention_days (Medcare 2190 = 6yr HIPAA), auto_action_confidence (Medcare 0.92 > SMB 0.75), Escalation (Llm / Human / Reject), requires_fail_closed, VerbTaxonomyId (Generic / Smb / Medcare).
  • Display impl for StepDomain (LOW from review).
  • trajectory-audit feature stub on lance-graph-contract (E4 forward-compat gate).

Stats

  • 4 files changed, +496 lines
  • 3 commits (2 workers + 1 meta integration)
  • 63 tests pass (auth-rls-lite)

Test plan

  • cargo check -p lance-graph-callcenter --features auth-rls-lite — green
  • cargo test -p lance-graph-callcenter --features auth-rls-lite --lib — 63 passed
  • Display round-trips through from_step_type for all 7 variants
  • Medcare requires fail-closed, higher confidence, HIPAA-grade retention
  • PolicyRewriter kind + name dispatch

https://claude.ai/code/session_01SbYsmmbPf9YQuYbHZN52Zh

claude added 3 commits April 29, 2026 05:45
- Added pub mod policy gate behind auth-rls-lite (PolicyRewriter trait
  + ColumnMaskRewriter from epiphany E1)
- Added trajectory-audit feature alias on lance-graph-contract for the
  forward-stub step_trajectory_hash helper (E4 cross-PR bridge)
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 176566087c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +49 to +50
#[cfg(feature = "auth-rls-lite")]
pub trait PolicyRewriter: Send + Sync + std::fmt::Debug {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Align policy API cfg with auth-rls/full feature gates

lib.rs enables the policy module for auth-rls, auth, and full, but the core API (PolicyRewriter and ColumnMaskRewriter) is compiled only under auth-rls-lite. In builds such as --features full (which currently does not imply auth-rls-lite), downstream code can see policy but cannot import or use the rewriter seam introduced by this change, causing feature-dependent unresolved-item breakage.

Useful? React with 👍 / 👎.

_step: &UnifiedStep,
_trajectory: &[u64; 256],
) -> u64 {
unimplemented!("see PR #279 outlook E4")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid shipping a public panic path in trajectory-audit

When the trajectory-audit feature is enabled, step_trajectory_hash is a public function that unconditionally calls unimplemented!, so any invocation will panic and can terminate orchestration at runtime. Because the feature is declared in Cargo.toml, consumers can enable it and hit this crash path; until implementation is ready, this should return a typed error or remain unavailable instead of panicking.

Useful? React with 👍 / 👎.

@AdaWorldAPI AdaWorldAPI merged commit 2190eda into claude/foundry-fixes-r2-2026-04-29 Apr 29, 2026
1 of 5 checks passed
AdaWorldAPI added a commit that referenced this pull request Apr 29, 2026
…26-04-29

Re-land #281 unlocks (PolicyRewriter, DomainProfile) — orphaned by merge order
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.

2 participants