gitoria

kunibert

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit7a1279ee7a1279eeRule: conductor merges own utility PRs after green reviewmre7a1279ee/service/project.hl

2.1 KB

  1. import WebFramework from 'hl:web'
  2. import { args } from 'hl:proc'
  3. import { readFile } from 'hl:fs'
  4. import { every } from 'hl:time'
  5. import Intake from '../lib/intake.hl'
  6. \\ MAP (kunibert#5 step 1): the gitoria event hook and the job queue.
  7. \\ POST /hook/gitoria lib/intake.hl (checks, answers) -> lib/gitoria-events.hl (event names) -> lib/queue.hl (jobs, worker)
  8. \\ GET /health lib/intake.hl -> lib/queue.hl health
  9. \\ timer tick lib/queue.hl tick -> lib/run-job.hl runJob
  10. \\ Run: HL_ENV=production hybriel service <config.json> config: { port, host (default 127.0.0.1), dataDir, tickSeconds, maxParallel (default 3, minimum 1), maxTries, backoffSeconds, reposFile, secretsFile (optional default secret), hybriel, jobTimeoutSeconds, runnerData, ticketsBase (optional), ticketsTokenFile (optional), reviewUser (optional: unix user the model runs as), codexBin (default codex), workDir (optional: where job worktrees go) }
  11. config = JSON.parse(readFile(args()[0]))
  12. port = config.port
  13. opt = (v, d) => { if (v == null) { return d } return v }
  14. \\ optional: reposFile (per-repo config), hybriel (runtime binary), jobTimeoutSeconds (default 900), runnerData
  15. intake = new Intake(secretsFile = opt(config.secretsFile, ''), dataDir = config.dataDir, maxTries = config.maxTries, maxParallel = opt(config.maxParallel, 3), backoffSeconds = config.backoffSeconds, reposFile = opt(config.reposFile, ''), hybriel = opt(config.hybriel, 'hybriel'), timeoutSeconds = opt(config.jobTimeoutSeconds, 900), runnerData = opt(config.runnerData, ''), ticketsBase = opt(config.ticketsBase, ''), ticketsTokenFile = opt(config.ticketsTokenFile, ''), reviewUser = opt(config.reviewUser, ''), codexBin = opt(config.codexBin, 'codex'), workDir = opt(config.workDir, ''))
  16. intake.start()
  17. routes = [
  18. { pattern = "/hook/gitoria" method = "POST" function = (route, req) => { return intake.hook(req) } }
  19. { pattern = "/health" function = (route, req) => { return intake.health() } }
  20. ]
  21. ticker = every(config.tickSeconds)
  22. on ticker.tick(t) { intake.tick() }
  23. webFrameworkServer = new WebFramework(routes = routes, port = port, host = opt(config.host, '127.0.0.1'), watchMode = false)

Branches

Latest commits

  • 7a1279eeRule: conductor merges own utility PRs after green reviewmre
  • 4038b3e0Log: kunibert#18 openedmre
  • 18543db1Log: day42 fetch fix, re-vendor pendingmre
  • 81a12f96Statusmre
  • 6ce706abRecords: neutral wording, split cleanupmre
  • 81a4d31bDocs: neutral wordingKunibert
  • 8205b05eRecords: #17 livemre
  • c3391204Answer fresh reviews under open threadsKunibert
  • a0f3d147Records: #16 livemre
  • 04322148Run reviews in parallel across repositoriesKunibert
  • a6577aaeRecords: #14 live, #16 startedmre
  • 0382238bStart fresh on Review again and name vendored pathsKunibert
  • 5608c6f1Records: kunibert#13 vendored paths livemre
  • 8840771dExclude vendored findings from app verdictsKunibert
  • 6aa65353Records: jukebox connected, first reviewmre
  • ad8011cfRecords: neutral ticket rule, jukeboxmre
  • ca5f31dfPrompt: neutral reviewer identitymre
  • b241d9c8Records: Anton tryParse noteKunibert
  • 42cc1bc0Records: K12 doneKunibert
  • 9e6039eeRecords: gates K11, K12Kunibert