HYPERFLEET-1278 - feat: remove email restriction for audit fields#9
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughAPI version is bumped from Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Supply chain flag: Schema weakening: Removing 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
schemas/template/openapi.yaml (1)
1502-1514: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftUpdate the linked architecture/codegen contract with this schema relaxation.
These ranges remove the public
format: emailcontract from audit fields, but the linked architecture repo still documentscreated_by/updated_byas{ type: string, format: email }, andhyperfleet/standards/generated-code-policy.md:327still modelsCreatedByasopenapi_types.Email. That leaves the published schema, architecture guidance, and codegen policy out of sync for downstream validators and generated clients. As per path instructions, "Validate changes against HyperFleet architecture standards from the linked architecture repository."Also applies to: 1667-1678, 2030-2041, 2222-2233, 2628-2639, 2813-2824
🤖 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 `@schemas/template/openapi.yaml` around lines 1502 - 1514, The audit field schema has been relaxed to plain strings, but the architecture and codegen contract still treat created_by and updated_by as email-typed fields. Update the linked architecture documentation and hyperfleet/standards/generated-code-policy.md to match the new schema by removing the email format/Email type from these audit fields, and ensure any generated-code references to CreatedBy/UpdatedBy use string-based modeling so downstream validators and clients stay consistent.Sources: Path instructions, Linked repositories
🤖 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 `@main.tsp`:
- Line 36: The `@info.version` entry in main.tsp is not being emitted in the exact
string format that the CI version extraction step expects, causing the parse to
fail. Update the version declaration so it matches the CI parser’s required
`version: "..."` shape exactly, using the existing version symbol in main.tsp,
or adjust the workflow parser in the same change if the format must change.
---
Outside diff comments:
In `@schemas/template/openapi.yaml`:
- Around line 1502-1514: The audit field schema has been relaxed to plain
strings, but the architecture and codegen contract still treat created_by and
updated_by as email-typed fields. Update the linked architecture documentation
and hyperfleet/standards/generated-code-policy.md to match the new schema by
removing the email format/Email type from these audit fields, and ensure any
generated-code references to CreatedBy/UpdatedBy use string-based modeling so
downstream validators and clients stay consistent.
🪄 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: 88f94e82-2cc4-43e8-9187-4fe53d45df18
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
main.tsppackage.jsonschemas/template/openapi.yamlschemas/template/swagger.yaml
🔗 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)
| @service(#{ title: "HyperFleet API" }) | ||
| @info(#{ | ||
| version: "1.0.25", | ||
| version: "1.0.26", |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Keep @info.version in the exact format CI parses.
Line 36 is part of the merge gate: .github/workflows/ci.yml:42-64 extracts version: "..." from main.tsp, and this PR already fails that step with Failed to extract version from main.tsp. Merge stays blocked until this entry is emitted in the exact parseable form or the workflow is updated in the same change.
🤖 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 `@main.tsp` at line 36, The `@info.version` entry in main.tsp is not being
emitted in the exact string format that the CI version extraction step expects,
causing the parse to fail. Update the version declaration so it matches the CI
parser’s required `version: "..."` shape exactly, using the existing version
symbol in main.tsp, or adjust the workflow parser in the same change if the
format must change.
Source: Pipeline failures
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kuudori The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1f869c2
into
openshift-hyperfleet:main
Summary
Updates to core spec v.1.0.25
This spect itself is versioned as v1.0.26 as its version is independent of the core contract