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
- 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
- 88aaacc5Records: real proof part 2 (posting works, sandbox blocked by AppArmor userns)mre
- 401df4e8Records: review user logged inmre
- 6ca681b3Records: login command, status cleanupmre
- 6b8d763cRecords: review user, device login startedKunibert
- 07025b99Open the job worktree read-only for the review user before each model runKunibert
- 2a44bd54Runner CLI: --review-user/--codex-bin/--work-dir work in every modeKunibert
- 2177f66fReview model runs as its own unix user (reviewUser, codexBin, workDir)Kunibert
- 35df8306Records: live service on byrodin, real proof part 1Kunibert