Skip to content

fix(relay): enforce scalar-only claims and surface untracked privacy budget - #632

Merged
jeremi merged 5 commits into
mainfrom
agent/1.0-relay-correctness
Aug 7, 2026
Merged

fix(relay): enforce scalar-only claims and surface untracked privacy budget#632
jeremi merged 5 commits into
mainfrom
agent/1.0-relay-correctness

Conversation

@jeremi

@jeremi jeremi commented Aug 1, 2026

Copy link
Copy Markdown
Member

Relay-correctness group from the 1.0 milestone. One commit per ticket so review can split or drop them independently.

#88 — scalar-only attribute-release claims (fix(relay))

Attribute-release claim values are now scalar-only (string, number, boolean), mirroring the existing scalar_subject_value rule on the subject side. A claim whose projected (source_field) or computed (CEL) value is an object or an array is treated as unavailable instead of passed through: a required claim of that shape denies the release (release.subject_denied, no values leaked), an optional one is omitted. A computed null is omitted rather than released as a JSON null literal. Claim selection stays top-level-only; a dotted path like address.region does not select into a structured column.

  • Structured values were previously passed through to the claims bundle unvalidated, so this narrows the released surface (data minimization, fail-closed).
  • Diagnostics stay value-free: the new attribute_release.claim.non_scalar_value warn line carries profile id, claim name, and a JSON type tag only.
  • OpenAPI: claims response property is now additionalProperties: { "type": ["string", "number", "boolean"] } with matching descriptions. The committed spec is regenerated by the documented generator command; oasdiff breaking + stability filter pass against main.

#585 — surface the untracked privacy budget on sensitive aggregates (feat(relay))

A dataset classified personal, confidential, or secret with an access.aggregate_only_execution aggregate (dataset-, table-, or entity-level) now raises the relay.aggregates.privacy_budget_untracked deployment finding, bound finding_warn under hosted_lab, production, and evidence_grade. Aggregate routes apply per-result k-anonymity suppression but track no longitudinal query budget (query_budget.tracked is always false); this is the documented accepted limitation ("Aggregates are not privacy-budgeted" in known limitations), not a fixable misconfiguration, so the gate warns everywhere rather than blocking startup or readiness. A deployment waiver naming the finding records the operator's acknowledgement.

  • Boot is loud: an active finding emits a dedicated deployment.privacy_budget_untracked warn line with the waiver remediation; a waived one reports through the existing deployment.gate_waived line, not a duplicate.
  • The finding reaches GET /admin/v1/posture and registryctl doctor through the existing catalog plumbing; no registryctl changes.
  • Docs: findings-catalog row and paragraph plus a cross-reference from the aggregates section in crates/registry-relay/docs/configuration.md, and one bullet in the hardening checklist.

#75 — thrift RUSTSEC advisory triage (no commit)

Triage-only; conclusion posted on the issue: #75 (comment). No tagged DataFusion release currently clears the advisory (54.1.0 still pins parquet ^58.3.0, which pins thrift 0.17; parquet 59.x drops thrift). cargo deny check passes with the scoped ignore already recorded in deny.toml.

Security review notes (per AGENTS.md)

Verification

  • cargo fmt --check, cargo check --locked --workspace --all-targets, cargo clippy --workspace --all-targets -- -D warnings, cargo test --locked --workspace, cargo deny check: pass.
  • just openapi-contract vs origin/main: pass.
  • docs/site: npm test and npm run check: pass.

Closes #88. Closes #585.

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

Copy link
Copy Markdown

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: 8d05c573d9

ℹ️ 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 thread crates/registry-relay/CHANGELOG.md Outdated
Comment thread docs/site/src/content/docs/reference/apis/registry-relay.mdx
Comment thread crates/registry-relay/src/api/attribute_release.rs Outdated
Comment thread crates/registry-relay/src/deployment/mod.rs Outdated
@jeremi
jeremi force-pushed the agent/1.0-relay-correctness branch from 8d05c57 to 92d4eb1 Compare August 1, 2026 11:11
@jeremi

jeremi commented Aug 1, 2026

Copy link
Copy Markdown
Member Author

Force-pushed: rebased onto current main plus two review fixes amended into their ticket commits (warn-once dedupe into the #88 commit, dataset-level-only gate fact into the #585 commit).

About the earlier "Immutable docs archives" / "Docs" failures: the change classifier diffs base.sha..head two-dot, and main had moved ahead with e303c31 (.github/workflows/release.yml), which is in the docs_archives trigger set. That ran the candidate-archive rebuild on this content PR, and the v0.16.0 candidate archive rebuilds from the checked-out tree, so any PR touching candidate-visible content fails its immutable lock check while v0.16.0 awaits bundle publication. Content paths are deliberately not in the docs_archives trigger set (see #626, where the job correctly skips), so rebasing onto current main restores the intended gating for this PR.

Worth a maintainer's attention separately: any docs-content PR that also happens to trip the docs_archives trigger during a candidacy window will hit this same lock mismatch; the classifier's two-dot diff makes that trigger dependent on unrelated main movement.

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

Copy link
Copy Markdown

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: 92d4eb108a

ℹ️ 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 thread crates/registry-relay/CHANGELOG.md Outdated
Comment thread crates/registry-relay/src/api/attribute_release.rs Outdated
@jeremi
jeremi force-pushed the agent/1.0-relay-correctness branch from 92d4eb1 to 3f39b07 Compare August 1, 2026 12:27

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

Copy link
Copy Markdown

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: 3f39b07978

ℹ️ 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 thread crates/registry-relay/CHANGELOG.md Outdated
Comment thread docs/site/src/content/docs/security/hardening-checklist.mdx Outdated
@jeremi
jeremi force-pushed the agent/1.0-relay-correctness branch from 3f39b07 to e87e283 Compare August 1, 2026 12:44

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

Copy link
Copy Markdown

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: e87e283eeb

ℹ️ 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 thread crates/registry-relay/CHANGELOG.md Outdated
@jeremi
jeremi force-pushed the agent/1.0-relay-correctness branch from e87e283 to 26bb8cc Compare August 1, 2026 13:10
@jeremi

jeremi commented Aug 1, 2026

Copy link
Copy Markdown
Member Author

Force-pushed again: rebased onto current main to resolve a crates/registry-relay/CHANGELOG.md conflict with the v0.16.1 release-train commits. That conflict is also why CI went silent on the previous two heads: GitHub skips pull_request workflow runs entirely when the merge commit cannot be created, so the branch showed no Actions runs rather than a red X. Mergeability is restored and CI is running on 26bb8cc. The head also includes the two review fixes from the latest Codex round: profile version in the non-scalar warning identity and dedupe key (#88 commit), and the hardening-checklist bullet now naming the bound profiles instead of "every declared profile" (#585 commit).

@jeremi
jeremi force-pushed the agent/1.0-relay-correctness branch 2 times, most recently from 3d1f865 to 234ec6f Compare August 1, 2026 16:17

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

Copy link
Copy Markdown

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: 234ec6f69b

ℹ️ 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 thread crates/registry-relay/CHANGELOG.md
@jeremi
jeremi force-pushed the agent/1.0-relay-correctness branch from 234ec6f to 79037b3 Compare August 1, 2026 18:36
jeremi added 2 commits August 5, 2026 17:12
Attribute-release profiles could accidentally release structured
object/array values through a direct source-field read or a CEL
expression. Hold both claim kinds to the same scalar contract the
subject side already enforces: a non-scalar value is unavailable, so a
required claim denies the release and an optional one is omitted, with
a value-free warn naming only the profile, claim, and JSON type tag.

The contract is enforced at every layer, not just the HTTP handler:
evaluate_release_scalar rejects structured results as a TypeMismatch,
config validation (and registryctl check, via the shared validator)
rejects expressions that always produce a list or map, and the
warn-once dedupe lives on the per-snapshot evaluator so a registry-wide
reload re-arms it. Marked BREAKING in the changelog with a migration
pointer to Registry Evidence assertions, per the issue triage decision.
Document the contract in the OpenAPI schemas, the API guide, and the
API reference.

Closes #88

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
A dataset classified personal, confidential, or secret that declares a
dataset-level access.aggregate_only_execution aggregate now raises the
relay.aggregates.privacy_budget_untracked deployment finding, bound
finding_warn under hosted_lab, production, and evidence_grade. Only
dataset-level declarations count: the aggregate query routes resolve
aggregates through dataset.aggregates alone, so table-level and
entity-level declarations have no runtime route and raise no finding.
Aggregate routes apply per-result minimum cell-size suppression but
track no longitudinal query budget; this is the documented accepted
limitation from the known-limitations page, so the gate warns
everywhere rather than blocking startup or readiness. The docs present
leaving the warning active as a legitimate steady state, with a
deployment waiver as the optional dated acknowledgement, since waivers
carry a mandatory expiry and the limitation is not fixable. Boot is
loud: an active finding emits a dedicated
deployment.privacy_budget_untracked warn line; a waived one reports
through the existing deployment.gate_waived line. The finding reaches
the posture endpoint and registryctl doctor through the existing
catalog plumbing.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
@jeremi
jeremi force-pushed the agent/1.0-relay-correctness branch from 79037b3 to d146c8c Compare August 5, 2026 10:21

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

Copy link
Copy Markdown

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: d146c8c97b

ℹ️ 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 thread crates/registry-relay/CHANGELOG.md
…ctness

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>

# Conflicts:
#	crates/registry-relay/CHANGELOG.md

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

Copy link
Copy Markdown

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: b4d32a6842

ℹ️ 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 thread crates/registry-relay/CHANGELOG.md
jeremi added 2 commits August 7, 2026 14:35
…ctness

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>

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

Copy link
Copy Markdown

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: 48ffe4cacf

ℹ️ 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 thread crates/registry-relay/CHANGELOG.md
@jeremi
jeremi merged commit 461ce12 into main Aug 7, 2026
35 checks passed
@jeremi
jeremi deleted the agent/1.0-relay-correctness branch August 7, 2026 07:50
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.

Surface the sensitive-dataset aggregate privacy-budget limitation as a loud deployment-gate finding Keep attribute-release claims scalar-only for 1.0

1 participant