kunibert
All repositories: gitoria
2.0 KB
import WebFramework from 'hl:web'import { args } from 'hl:proc'import { readFile } from 'hl:fs'import { every } from 'hl:time'import Intake from '../lib/intake.hl'\\ MAP (kunibert#5 step 1): the gitoria event hook and the job queue.\\ POST /hook/gitoria lib/intake.hl (checks, answers) -> lib/gitoria-events.hl (event names) -> lib/queue.hl (jobs, worker)\\ GET /health lib/intake.hl -> lib/queue.hl health\\ timer tick lib/queue.hl tick -> lib/run-job.hl runJob\\ Run: HL_ENV=production hybriel service <config.json> config: { port, host (default 127.0.0.1), dataDir, tickSeconds, 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) }config = JSON.parse(readFile(args()[0]))port = config.portopt = (v, d) => { if (v == null) { return d } return v }\\ optional: reposFile (per-repo config), hybriel (runtime binary), jobTimeoutSeconds (default 900), runnerDataintake = new Intake(secretsFile = opt(config.secretsFile, ''), dataDir = config.dataDir, maxTries = config.maxTries, 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, ''))intake.start()routes = [{ pattern = "/hook/gitoria" method = "POST" function = (route, req) => { return intake.hook(req) } }{ pattern = "/health" function = (route, req) => { return intake.health() } }]ticker = every(config.tickSeconds)on ticker.tick(t) { intake.tick() }webFrameworkServer = new WebFramework(routes = routes, port = port, host = opt(config.host, '127.0.0.1'), watchMode = false)
Branches
Latest commits
- ad8011cfRecords: neutral ticket rule, jukeboxmre
- ca5f31dfPrompt: neutral reviewer identitymre
- b241d9c8Records: Anton tryParse noteKunibert
- 42cc1bc0Records: K12 doneKunibert
- 9e6039eeRecords: gates K11, K12Kunibert
- 59b8fe83Use Hybriel day39 helpersKunibert
- c2e393a2Records: K12 startedKunibert
- 00696678Records: Anton day39 notemre
- 070e01a4Records: parkmre
- bf8af0dcRecords: v1.4 checkedmre
- 44af321bRecords: contract v1.4mre
- 310f3fd0Records: outdated semanticsmre
- 268ebfe6Records: #11 proven live and closedmre
- 88e8aad3Records: K11 verified and deployedmre
- cd4cb09cNo review and status error when the model's tools did not run (kunibert#11)Kunibert
- a6b54efaStatus updatemre
- 5a72268eRecords: #4-#10 done, #11 started, review package on #1mre
- 194c7da6Records: real proof greenmre
- cdfa94a9Records: AppArmor profile for the review sandboxmre
- c1bf02d8Status: sandbox blockermre