scheduling: let a source system publish bookable windows under a source profile

Offen
#2,732 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
openapi, postgresql, rust

Rechercherichtung

Read crates/registry-scheduling/src/source_busy.rs and the scheduling documentation and security page linked in the issue to understand the existing source-busy flow and operator publishing rules. Then map the proposed preview/apply behavior, source ownership, revision handling, and profile limits to the acceptance criteria. Done means the PostgreSQL suite covers the listed cases and the OpenAPI document, clients, applicable CLI catalogue, security page, and repository guidance are updated.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

area:scheduling criticality:p2 enhancement triage:needs-implementation

Use case

Many institutions already hold the schedule in another system: a registry of training sessions or exam sittings, a programme's distribution days, a register of public activities, a staff roster. That system should be able to publish bookable windows without an operator re-keying them and without holding the operator's credential.

Current evidence

  • Windows are environment records that only an operator publishes. records apply replaces the whole document.
  • Source-busy already lets a configured source subtract supply through /v1/source-busy/{preview,apply} (source_busy.rs). Nothing equivalent adds supply.
  • The Scheduling security page does not describe busy sources as a trust boundary.

Proposed behaviour

  • /v1/source-windows/preview and /v1/source-windows/apply, mirroring source-busy: a configured source profile, a bounded snapshot under expectedRevision, and preview before apply.
  • Per profile, the operator declares the source identity, the offerings and locations it may publish for, a horizon, and maximum units per window and in total. Anything outside is refused.
  • A snapshot is keyed by the source's own record reference. One source record, such as one activity or one session series, publishes and replaces only its own windows. The source record's revision is the expected revision, so replays and out-of-order deliveries are safe.
  • Source-published windows are marked as source-owned. Operator records apply neither overwrites nor deletes them, and a source cannot touch operator windows.
  • Shrinking or removing a window below its live bookings is refused, unless the snapshot withdraws it explicitly under #2730.
  • Published windows are distinct sessions, so callers book them by window (#2731).

Acceptance criteria

  • A source publishes, replaces and withdraws its own windows within its profile.
  • The route refuses windows outside the profile's offerings, locations, horizon or units, and refuses a stale revision.
  • Replaying a snapshot is idempotent.
  • Operator records and source windows do not overwrite each other.
  • A PostgreSQL suite covers the above. The OpenAPI document, clients and, if schedulingctl gains commands, the CLI catalogue are regenerated.
  • The Scheduling security page adds source-published supply and busy sources to its trust boundaries. The repository guidance's "operator-anchored supply" sentence is updated in the same change.

Delivery

Implemented in one PR with #2731 and the Coordinator operation that follows this issue.

Vorherrschende Sprache
Rust
Sterne
2
Forks
0
Ø Merge
9 Std. 48 Min.
Gemergte PRs (30 T.)
151

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus registrystack/registry-stack

Alle Issues in registrystack/registry-stack

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.