Skip to content

feat(maintenance): add fire-equipment park maintenance and resource management - #559

Merged
DevSkyLex merged 1 commit into
developfrom
feat/fire-equipment-maintenance-api
Oct 7, 2026
Merged

DevSkyLex merged 1 commit into
developfrom
feat/fire-equipment-maintenance-api

Conversation

@DevSkyLex

@DevSkyLex DevSkyLex commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Context

FireGuard now supports the full fire-equipment park lifecycle: identify equipment, schedule independent controls and maintenance, retain execution evidence, repair or replace assets, and analyze internal maintenance costs. FireGuard branding remains unchanged.

Change Summary

  • Enrich equipment dossiers, optional internal customers, organization-managed equipment types, archive-aware park queues and idempotent replacement with retained history.
  • Introduce independent operation plans, fixed calendar anchors, occurrence reservation, explicit result validation and single-engine migration from historical schedules.
  • Add service requests, corrective work, quantitative inventory, procurement, exact valuations, current/frozen costs and immutable versioned ERP exports.
  • Address review findings around campaign scope, historic identity, partial returns, archive-page memory, financial allocation, direct equipment and supplier filters.

Review Guide

Modules / Areas

Equipment, Facility, Maintenance, Inspection, Intervention, Organization and Onboarding; new Customer, ServiceRequest, Inventory, Procurement, MaintenanceCost and MaintenanceExport modules.

Main Files / Entry Points

Module contracts and MODULE.md files, explicit main-manager wiring in config/modules, API resources and DTOs, the canonical openapi.json, and twenty additive migrations under migrations/main.

Reviewer Focus

  • Business logic correctness
  • Authorization / permissions
  • Tenant / organization isolation
  • API contract / serialization
  • Persistence / migrations / Doctrine mapping
  • Entity manager wiring (auth vs main database)
  • Architecture / layer boundaries
  • MODULE.md updated
  • Query / collection performance
  • Regression tests

Functional Impact

  • User-visible behavior changed
  • Public API or response shape changed
  • Database schema or migration impact

Existing routes, equipment type codes, QR identities, historical campaigns and offline command identities are retained. A realized unfavorable control does not close its anomalies; creating work does not complete an occurrence. Published dossiers retain their original identity and evidence. Unknown historic cost attribution remains incomplete.

Risk And Rollback

  • Cross-organization scope involved
  • Persistence / transaction / data lifecycle changed

Dedicated financial permissions protect costs and exports. Inventory facts survive shortage without negative stock or implicit partial debit. Return valuation restores exactly the remaining original value. Export corrections append compensating adjustments without rewriting retained artifacts.

Deploy using the existing development workflow, which backs up both databases and files before migration. An application rollback must use a compatible previously validated image; the additive schema is retained. Failed migrations require the documented coordinated recovery or a forward fix, not an automatic destructive schema rollback.

Validation

Local Validation

  • Full isolated PostgreSQL suite: 15,413 tests, 121,258 assertions.
  • PHPStan, uncached PHP CS Fixer, both Deptrac configurations, Symfony container/YAML lint and auth/main schema validation passed.
  • Cold OpenAPI export matches the retained contract; frontend contract audit and 54 contract tests passed.
  • Real regressions cover mixed validated/skipped task costs, historic unknown allocation, direct material identity, calendar timezones, archival, campaign scope, replay, return bounds and supplier state.
  • Metadata pages over 31 retained large exports transfer no artifact payloads and allocate approximately 105 KiB, instead of loading more than 400 MiB of archive bytes.

CI Validation

  • Standard PR checks cover this change.
  • Development deployment additionally requires successful CI and SonarQube on the exact integrated develop SHA.

Deployment Notes

  • Migration order matters
  • Manual post-deploy check required

Use develop and the existing Deploy VPS workflow. Keep reset_development_fixtures=false. The twenty new migrations belong to main; preserve the workflow's auth-then-main ordering, backups, RBAC synchronization and transport initialization. New operation plans are prepared and activated explicitly; the release does not automatically switch an organization's preventive engine. Deploy API before the companion frontend, then verify workflow health checks.

Known Gaps

Brand renaming, customer portal, cross-organization collaboration, sensors and a vendor-specific ERP connector remain deferred. General building and industrial maintenance remain outside scope.

@github-actions github-actions Bot added area:organization Organization or onboarding domain changes area:facility Facility domain changes area:equipment Equipment domain changes area:inspection Inspection or checklist domain changes area:shared Shared, notification, or audit changes area:tests Test-only changes area:docs Documentation changes area:config Configuration or runtime settings changes type:dependencies Composer dependency updates risk:database Database schema, migrations, or persistence risk risk:api-contract API contract or serialization risk size:xl Very large PR: 800 changed lines or more state:ready Ready for review labels Oct 7, 2026

@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: 502bcbdefc

ℹ️ 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".

#[ORM\Column(name: 'name', type: 'string', length: 160)]
public string $name;

#[ORM\Column(name: 'code', type: 'string', length: 64, nullable: true)]

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 supplier code storage with the accepted length

Supplier creation and update accept codes up to 80 characters (Supplier.php:82,165), but this mapping and the matching migration limit the column to 64 characters. A code between 65 and 80 characters therefore passes domain validation and then fails at PostgreSQL with a value-too-long error, which is not mapped by ProcurementExceptionSubscriber and surfaces as a 500. Increase the column to 80 or reduce the accepted limit to 64.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T09:41:10.429268Z 502bcbd PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@DevSkyLex
DevSkyLex merged commit 9be758c into develop Oct 7, 2026
20 checks passed
@DevSkyLex
DevSkyLex deleted the feat/fire-equipment-maintenance-api branch October 9, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:config Configuration or runtime settings changes area:docs Documentation changes area:equipment Equipment domain changes area:facility Facility domain changes area:inspection Inspection or checklist domain changes area:organization Organization or onboarding domain changes area:shared Shared, notification, or audit changes area:tests Test-only changes risk:api-contract API contract or serialization risk risk:database Database schema, migrations, or persistence risk size:xl Very large PR: 800 changed lines or more state:ready Ready for review type:dependencies Composer dependency updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant