HYPERFLEET-1278 - feat: remove email restriction for audit fields#64
HYPERFLEET-1278 - feat: remove email restriction for audit fields#64rh-amarin wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
📝 WalkthroughSummary by CodeRabbit
WalkthroughBumped version metadata from Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@shared/models/common/model.tsp`:
- Around line 159-168: The identity fields in the shared model were widened to
plain string, but downstream consumers still treat them as email-typed values.
Update the contract and any dependent presenters/serializers together,
especially the APIMetadata created_by and updated_by fields and their downstream
Email conversions, so the schema change is released only with matching type
handling in the HyperFleet API path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 255ba7ff-3253-4654-9901-7ba4dcf5582e
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
main.tsppackage.jsonschemas/core/openapi.yamlshared/models/common/model.tsp
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
openshift-hyperfleet/architecture(manual)openshift-hyperfleet/hyperfleet-api(manual)openshift-hyperfleet/hyperfleet-sentinel(manual)openshift-hyperfleet/hyperfleet-adapter(manual)openshift-hyperfleet/hyperfleet-broker(manual)
| created_by: string; | ||
|
|
||
| @doc("Identity that last updated the resource") | ||
| @format("email") updated_by: string; | ||
| updated_by: string; | ||
|
|
||
| @doc("Timestamp when deletion was requested; omitted if not marked for deletion") | ||
| @format("date-time") deleted_time?: string; | ||
|
|
||
| @doc("Identity that requested deletion; omitted if not marked for deletion") | ||
| @format("email") deleted_by?: string; | ||
| deleted_by?: string; |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Cross-repo contract break risk: identity fields widened to string while downstream still enforces email types (CWE-436).
APIMetadata.*_by is now unconstrained string, but openshift-hyperfleet/hyperfleet-api presenters still cast these fields to openapi_types.Email and use email converters. Release this spec change only with coordinated downstream type updates to avoid integration and serialization mismatches.
As per path instructions, "Validate changes against HyperFleet architecture standards from the linked architecture repository."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@shared/models/common/model.tsp` around lines 159 - 168, The identity fields
in the shared model were widened to plain string, but downstream consumers still
treat them as email-typed values. Update the contract and any dependent
presenters/serializers together, especially the APIMetadata created_by and
updated_by fields and their downstream Email conversions, so the schema change
is released only with matching type handling in the HyperFleet API path.
Sources: Path instructions, Linked repositories
Summary
Remove the email pattern restriction to
*_byfields, so another JWT claim that doesn't match an email pattern can be used for identity, like adapters using a k8s token