implement project and machine registries

This commit is contained in:
kami
2026-07-26 19:01:44 +04:00
parent 0a21e1bc2b
commit 7980839393
4 changed files with 211 additions and 6 deletions
+10 -6
View File
@@ -17,12 +17,12 @@ This is the implementation-oriented breakdown of the specification. It is a proj
- Done: Gitea reflection for terminal task state, keyed by the task's stable external issue number.
- Done: constant-time HMAC webhook authentication and injectable HTTP clients for testing.
3. **Projects and machine registry****not started**
- Project configuration
- Machine registry
- Herdr registry
- Reachability checks
- Hard machine affinity resolution
3. **Projects and machine registry****complete**
- Done: typed JSON project, machine, and herdr configuration with duplicate/reference validation.
- Done: machine-bound herdr registry with per-herdr capabilities, endpoint override, and concurrency configuration.
- Done: injectable reachability checks plus TCP reachability implementation.
- Done: hard project machine-affinity resolution; candidates are restricted to configured, reachable herdrs on allowed machines.
- Done: optional `ORCHESTRA_CONFIG` startup validation.
4. **Router and leases****partial groundwork**
- Done: manual lease/release/complete/block endpoints and lease-expiry release.
@@ -87,6 +87,10 @@ This is the implementation-oriented breakdown of the specification. It is a proj
- `POST /v1/tasks/{id}/complete`
- `POST /v1/tasks/{id}/block`
## Item 3 status
Item 3 (projects and machine registry) is implemented in `internal/registry`. Static JSON configuration is loaded and validated, projects resolve only to their explicitly configured machines, and candidate herdrs are filtered by registration and injected reachability. Set `ORCHESTRA_CONFIG` to validate a configuration file at server startup.
## Item 2 status
Item 2 (provider layer) is implemented. `internal/provider` now includes `JSONLWatcher`, `Gitea.Poll`, `Gitea.WebhookHandler`, `Gitea.IngestWebhook`, and `Gitea.ReflectTask`. Gitea ingestion remains idempotent through the store's `(source, external_id)` key. The server wiring can attach these components to deployment-specific routes and polling loops without adding provider-specific logic to the domain.