Skip to content

feat: add ATC position management API - #3

Merged
xfoxfu merged 2 commits into
mainfrom
codex/t-85-atc-position-api
Aug 29, 2026
Merged

feat: add ATC position management API#3
xfoxfu merged 2 commits into
mainfrom
codex/t-85-atc-position-api

Conversation

@xfoxfu

@xfoxfu xfoxfu commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary

  • add CRUD endpoints for ATC positions and frequencies
  • use callsign as the primary key and audit-log entity key
  • seed 665 published positions from the VATPRC station list
  • return positions ordered by CTR, APP, TWR, GND, RMP, DEL, then callsign
  • restrict mutations and audit-log access to AFV facility engineers

Testing

  • cargo test --all-targets (80 passed)
  • validated 665 unique seeded callsigns

Tracking

@linear-code

linear-code Bot commented Aug 29, 2026

Copy link
Copy Markdown

T-85

Copilot AI 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.

Pull request overview

Adds a new ATC Position management module (CRUD + OpenAPI docs) backed by a new atc_position table seeded from the VATPRC station list, and extends the audit-log model/storage to support non-UUID entity identifiers via entity_key (used for ATC position callsigns).

Changes:

  • Introduces atc_position module with routes/service/repository/DTOs and wires it into the app router and Services.
  • Extends audit logging to support AuditLogEntity::AtcPosition(String) and adds list endpoints for ATC-position audit logs.
  • Adds a migration to create and seed public.atc_position, and updates public.audit_log to allow either entity_id or entity_key.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/services.rs Registers AtcPositionService in the shared Services container.
src/openapi.rs Adds ATC Positions API docs + OpenAPI test assertions for new endpoints.
src/modules/mod.rs Exposes the new atc_position module.
src/modules/audit_log/service.rs Adds ATC-position audit log listing methods.
src/modules/audit_log/routes.rs Adds secured audit-log routes for ATC positions and callsign-scoped audit queries.
src/modules/audit_log/repository.rs Adds entity_key support and ATC-position entity conversions + query by entity key.
src/modules/audit_log/models.rs Adds AuditLogEntity::AtcPosition(String) (non-Copy).
src/modules/audit_log/dto.rs Adds DTO mapping for ATC-position audit-log entities.
src/modules/atc_position/service.rs Implements CRUD service with audit-log recording for position changes.
src/modules/atc_position/routes.rs Adds list/get/create/update/delete endpoints with role-gated mutations.
src/modules/atc_position/repository.rs Adds SQLx repository operations + required sort order for listing positions.
src/modules/atc_position/models.rs Defines position models + category enum string conversions.
src/modules/atc_position/mod.rs Declares atc_position submodules.
src/modules/atc_position/dto.rs Adds request/response DTOs, callsign normalization, frequency validation + tests.
src/error.rs Maps AtcPositionServiceError into ApiError.
src/app.rs Mounts /api/atc/positions routes.
migrations/20260829000000_add_atc_positions.sql Creates atc_position, seeds 665 rows, and extends audit_log with entity_key.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@xfoxfu
xfoxfu marked this pull request as ready for review August 29, 2026 02:30
@xfoxfu
xfoxfu merged commit 055b26c into main Aug 29, 2026
2 checks passed
@xfoxfu
xfoxfu deleted the codex/t-85-atc-position-api branch August 29, 2026 02:38
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