Skip to content

feat(t20): implement laboratory persistence for LAB-02 and LAB-06 - #56

Open
dbracika29-hash wants to merge 6 commits into
mainfrom
feature/t20-lab-persistence
Open

dbracika29-hash wants to merge 6 commits into
mainfrom
feature/t20-lab-persistence

Conversation

@dbracika29-hash

Copy link
Copy Markdown
Collaborator

Component and requirement IDs

  • Component: Laboratory Persistence
  • Requirements: LAB-02, LAB-06
  • Team: 20

Changes

  • Added PostgreSQL persistence for laboratories and their prerequisites.
  • Created AuthoringDbContext and EF Core migrations.
  • Implemented ILaboratoryRepository for saving, loading and updating laboratories.
  • Added methods for adding, removing and retrieving prerequisites.
  • Connected the repository to the API using dependency injection.

Verification

  • All 62 tests passed locally, including 7 integration tests.
  • Tested saving and loading data from PostgreSQL.
  • Checked that laboratory IDs stay the same after updating their data.
  • EF Core migrations applied successfully.

Architecture and data flow

API → Repository → EF Core → PostgreSQL

Security checks and negative tests

  • Prevented laboratories from referencing themselves.
  • Tested duplicate prerequisites and references to nonexistent laboratories.
  • Used database constraints to keep relationships valid.

Dependencies

  • .NET 10
  • EF Core 10
  • PostgreSQL 17

Business validation, authorization and cycle detection are not included in this part.

owlCoder commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Pregled 04.11: LAB-02/LAB-06 jesu celine tima 20, ali PR dodaje persistence/DI u zajednički Platform.Authoring modul koji već koristi tim 11. Potrebno je dokumentovati dogovoreni integracioni ugovor sa timom 11 i usklađenost sa LAB-01 identitetom tima 14 te postojećim LAB-02/LAB-06 modulima, bez paralelnih kontradiktornih modela. Sada postoji i merge konflikt sa main: rešiti konflikt, ponovo pokrenuti CI i dostaviti dokaz koordinacije. Ne merge-ujemo u ovom stanju.

owlCoder commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Ponovni pregled 04.11. u 13h: LAB-02 i LAB-06 pripadaju timu 20. U main je sada merge-ovan #43 (LAB-02 metadata), a #56 uvodi zaseban persistence sloj u Platform.Authoring koji koristi tim 11. Trenutno postoji merge konflikt. Molimo integrisati sa #43 i LAB-01 modelom tima 14, dokumentovati granicu/ugovor sa timom 11, proveriti izbegavanje duplih modela, rešiti konflikte i ponoviti CI. Do tada ne merge-ujemo.

owlCoder commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Ponovni pregled 04.11. uveče: LAB-02/LAB-06 su tim 20, ali #56 i dalje ima merge konflikt i uvodi persistence u zajednički Platform.Authoring modul tima 11. Molimo dokumentovati koordinaciju sa timom 11 i uskladiti sa već merge-ovanim LAB-01/LAB-02 modulima (uključujući današnje #67/#71), bez duplih modela ili DI konflikata. Potreban zeleni CI nakon rešavanja konflikta.

@dbracika29-hash

Copy link
Copy Markdown
Collaborator Author

Updated PR #56 after merging the latest main.

  • Moved persistence to a separate Platform.LaboratoryPersistence project to avoid conflicts with Team 11.
  • Updated the repository to use the existing LAB-01 model and interface.
  • Used the existing LAB-02 metadata model and kept the same laboratory IDs.
  • Added persistence for laboratory revisions and prerequisites.
  • Updated EF Core migrations, tests and documentation.

Both GitHub checks are green. All 9 PostgreSQL integration tests passed locally.

The changes are documented in docs/components/T20-persistence.md. Coordination with Teams 11 and 14 still needs confirmation.

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