Code map¶
Every package and file of the repository with its types and functions, and the first sentence of each one's doc comment. Unexported (lowercase) names are internal to their package. Test files are listed with their test functions. The architecture chapters explain how these fit together.
Go packages¶
| Package | Files | Lines | What it is |
|---|---|---|---|
api/v1alpha1 |
3 | 300 | Package v1alpha1 contains the App API: one App per deployed application. |
cmd/rendimiento |
7 | 1878 | Command rendimiento runs the whole platform in one process: API and UI, CI workers and the App controller. |
escritorio |
12 | 1891 | rendimiento for Windows: the window, the icon next to the clock and the first-time assistant over rendimiento's WSL2 distribution. |
escritorio/wsl |
9 | 1617 | Package wsl keeps rendimiento's WSL2 distribution for the Windows app (instalar/wsl, published with each release): it says what is missing, turns WSL on, imports the distribution, wakes it and puts it to sleep, and reads the setup token for the setup page. |
hack/codemap |
1 | 271 | Command codemap writes the book's code reference (docs/content/reference/ code-map.md): every package, file, type and function of the repository, with the first sentence of its doc comment. |
hack/firmar |
1 | 68 | Command firmar signs a release's SHA256SUMS (decision 138). |
hack/interfaz |
1 | 438 | Command interfaz is the server the browser tests (web/e2e) drive: the real API and the built UI, on an empty Postgres (DATABASE_URL), as on a computer without Kubernetes (MODE=local's destination, without containers). |
hack/undoc |
1 | 53 | Command undoc lists exported Go declarations without a doc comment, the ones make docs-codemap would show with an empty summary. |
instalar |
4 | 347 | Package instalar is the installer for one computer, which rendimiento serves at /instalar so that curl -fsSL https://rendimiento.ai/instalar \| sh installs it. |
internal/actualizar |
4 | 522 | Package actualizar knows which rendimiento is published: once a day it asks GitHub for the latest release, and says whether it is newer than the one running, whether it only brings fixes (the same minor version: it may install itself, decision 138), and whether it is signed (only a signed one is ever installed). |
internal/addon |
5 | 1178 | Package addon renders add-ons (Helm charts or kustomize folders in git) into Kubernetes objects. |
internal/agentes |
22 | 6693 | Package agentes holds the agents that work inside the platform (ROLE=agents), woken by what happens in it rather than by a person's session. |
internal/ajustes |
3 | 446 | Package ajustes is the platform's settings that change while it runs: the boundary between organizations and their quota. |
internal/analytics |
2 | 813 | Package analytics reads visitor statistics from Umami, so each app's page shows who visits it without leaving rendimiento. |
internal/api |
86 | 20089 | Package api serves the REST + SSE API, GitHub webhooks, login, one-click GitHub App setup, and the embedded web UI. |
internal/arreglos |
4 | 1179 | Package arreglos runs an app's declared fixes (rendimiento.yaml's fixes:): a command that regenerates files, such as a lockfile, on a branch, in a pod of the build namespace. |
internal/bitbucket |
8 | 2796 | Package bitbucket is Bitbucket Cloud's forja, through its REST API 2.0 (Bitbucket Data Center comes later). |
internal/caminos |
2 | 310 | Package caminos builds an app's recent history as the Caminos tab draws it: the default branch is the camino real, every other branch is a vereda that leaves it at the commit it was branched from (or from its parent branch, for a stacked pull request) and comes back where its pull request was merged, with each run as a stop along the way. |
internal/catalog |
3 | 1089 | Package catalog lists the services apps can integrate with: what each one is, where it comes from (a rendimiento app, ArgoCD, Helm, kubectl), what it exposes (addresses, ports, public URLs, LAN IPs), how to call it from rendimiento.yaml, and which workloads already do. |
internal/controller |
11 | 3245 | Package controller reconciles App objects into running workloads: the GitOps half of rendimiento. |
internal/destino |
14 | 3000 | Package destino is where an app's releases run. |
internal/detect |
2 | 453 | Package detect inspects a repository tree and guesses how each deployable service in it is built, tested and served. |
internal/dns |
4 | 841 | Package dns manages the public DNS record for each app domain. |
internal/environment |
6 | 1847 | Package environment inspects the cluster and integrations rendimiento depends on and reports what is installed, what is missing and how to fix it, plus node and workload health. |
internal/events |
5 | 549 | Package events fans out live updates (step status, log lines) to UI subscribers over SSE. |
internal/firma |
2 | 154 | Package firma signs and checks rendimiento's releases (decision 138): each release's SHA256SUMS is signed with Ed25519 when it is published, and rendimiento installs a downloaded version only when that signature checks out against the public key it carries (Publica), and the file's sum is the one SHA256SUMS lists. |
internal/forja |
4 | 490 | Package forja is what rendimiento does where an app's code lives: GitHub today, GitLab and Bitbucket next. |
internal/fresco |
2 | 451 | Package fresco keeps slow answers (another service's numbers, a look at the cluster) so a page does not wait for them each time: a new answer is given as is; an old one is given at once while a new one is made behind it; and an answer never made yet is waited for, but only so long. |
internal/generate |
2 | 282 | Package generate turns detection results into a proposed rendimiento.yaml plus any files the repo is missing (Dockerfiles). |
internal/github |
8 | 2445 | Package github talks to GitHub as a GitHub App: short-lived installation tokens instead of personal access tokens, webhooks delivered for every installed repo, check runs for CI status and PRs for onboarding. |
internal/gitlab |
8 | 2746 | Package gitlab is GitLab's forja: gitlab.com or a GitLab of one's own, through its REST API (v4). |
internal/i18n |
5 | 1438 | Package i18n translates the platform's messages for people: the API's answers to a Spanish browser, and alert emails. |
internal/ia |
7 | 1146 | Package ia is the AI gateway: every call the platform makes to a model goes through it. |
internal/libreta |
2 | 760 | Package libreta is an app's notebook (Ruta 150): what was asked for the app and whether it is done. |
internal/llaves |
4 | 1552 | Package llaves changes the keys the platform talks to other services with, from the Environment page (Llaves y ajustes), while it runs: the Cloudflare token, the email (Resend) key, the platform's AI key, the log archive's S3 key and the Umami user. |
internal/logarchive |
2 | 349 | Package logarchive moves the step logs of finished CI runs out of Postgres into object storage (MinIO or any S3), gzip-compressed, and reads them back for the UI. |
internal/marcador |
2 | 152 | Package marcador is the scoreboard of a day's summary: the day's totals from each app's numbers, the runs by hour, and the day's lotería card, the one most notable thing. |
internal/mercado |
5 | 1009 | Package mercado makes web pages for people who don't write code. |
internal/mesa |
2 | 502 | Package mesa is an app's work board: each line of work (a branch with its pull request, its last run and the encargos about it, or an encargo with no branch) with how it stands and who it waits for. |
internal/mezcla |
2 | 176 | Package mezcla joins two versions of a file changed from a common base, the way git's three-way merge does, for whoever merges without git: the coding agent, which has no shell. |
internal/motor |
2 | 490 | Package motor runs containers on one machine, through the command line of containerd (nerdctl) or Docker: both take almost the same commands, so one implementation serves either without their libraries. |
internal/notify |
2 | 652 | Package notify emails the platform's owner about what needs attention: releases rolled back by verification, failed runs on the default branch, outages and recoveries. |
internal/pgprueba |
2 | 158 | Package pgprueba gives each test a Postgres database of its own, a copy of one migrated once for the whole package (CREATE DATABASE … TEMPLATE). |
internal/pipeline |
17 | 3772 | Package pipeline plans and executes CI runs. |
internal/platform |
51 | 10459 | Package platform is the orchestration core: it turns GitHub events into CI runs, successful default-branch runs into releases, and releases into App objects that the controller deploys. |
internal/probados |
2 | 1560 | Package probados changes, from the Environment page (Llaves y ajustes), the settings the platform reads when it starts and that change what it makes from then on: the image registry, the DNS zone and target, the certificate issuer, the storage class, the ingress class and its public address. |
internal/problems |
2 | 346 | Package problems keeps the platform's own warnings and errors for the Problems page: a slog handler passes every record on to the real log and also queues warnings and errors; a Recorder stores them, folding repeats of the same problem into one row with a count. |
internal/pruebas |
2 | 183 | Package pruebas judges an app's own tests after a release: it reads the line each test printed, and keeps for each test whether it only reports (advisory), may roll a release back (blocking), or is set aside (quarantined) because it fails and then passes on its own. |
internal/registro |
3 | 646 | Package registro keeps the image registry from filling up. |
internal/registrocentral |
2 | 617 | Package registrocentral keeps the platform's own log in one place: a slog handler passes every record on to the real log (stdout) and also queues each one at INFO and above, its secrets removed; a Recorder stores them in Postgres for the Log page, so a restarted pod no longer loses its lines and every process can be read together. |
internal/render |
8 | 1842 | Package render turns an app's spec plus its released images into the Kubernetes objects that run it. |
internal/renovate |
2 | 1210 | Package renovate is the Renovate add-on: it keeps the dependencies of the apps it is switched on for up to date by running Renovate on a schedule. |
internal/ruta |
18 | 4493 | Package ruta is the MCP endpoint (/mcp) through which agents read and write la Ruta: what the platform's people and agents know, kept in the platform rather than in any one agent's session. |
internal/secretos |
3 | 364 | Package secretos keeps the platform's own secrets (the GitHub App's credentials, organizations' AI keys) where there is no Kubernetes to keep them: sealed with AES-256-GCM in Postgres, by a key that lives outside the database, in a file only rendimiento reads. |
internal/selfupdate |
2 | 526 | Package selfupdate moves rendimiento to an image it built and tested itself: its own repository's builds: entry (SELF_APP), released like any app's. |
internal/senales |
4 | 860 | Package senales sends this installation's señales de vida: once a week, a few anonymous counts to rendimiento.ai, so the project knows how many installations are alive, and nothing else. |
internal/spec |
10 | 3404 | Package spec defines rendimiento.yaml, the only file an app repo needs. |
internal/spec/ejemplos |
2 | 142 | Package ejemplos holds rendimiento.yaml examples that every layer must accept: the spec's validation, the App object's schema in Kubernetes, render, and the local destination. |
internal/store |
85 | 13488 | Package store persists apps, CI runs, step logs, releases and sessions in Postgres. |
internal/testenv |
1 | 40 | Package testenv is the envtest (a real API server and etcd) the controller and platform tests run against, tuned for slow machines. |
internal/traces |
3 | 621 | Package traces keeps whole requests for the Universe's waterfall. |
internal/universe |
4 | 1356 | Package universe is the view of every app from above: the services each one runs, the databases and caches they use, what calls what, and what the internet reaches. |
internal/uptime |
2 | 856 | Package uptime checks every app's services once a minute and keeps the results: whether each answered, how fast, and when it was down. |
templates |
1 | 7 | Package templates embeds the Dockerfile templates used for repos that do not ship one. |
web |
1 | 22 | Package web embeds the built UI (npm run build → web/dist). |
api/v1alpha1¶
Package v1alpha1 contains the App API: one App per deployed application.
api/v1alpha1/addon_types.go¶
175 lines
| Name | Kind | Summary |
|---|---|---|
AddonSpec |
struct | AddonSpec is software rendimiento installs and keeps in sync, rendered from a Helm chart or from Kubernetes manifests (a kustomize folder) in git. |
AddonSource |
struct | AddonSource is exactly one of Helm or Git. |
HelmSource |
struct | HelmSource is a chart in a classic (index.yaml) Helm repository. |
GitSource |
struct | GitSource is a folder of Kubernetes manifests (or a kustomization) in a GitHub repository. |
AddonPhase |
type | AddonPhase summarizes an add-on's state for people: Synced, OutOfSync, Blocked, Error, Suspended. |
ObjectRef |
struct | ObjectRef identifies one object the add-on manages. |
PreviewItem |
struct | PreviewItem is what syncing would do to one object. |
Preview |
struct | Preview is what the next sync would do, from a server-side dry run of every object. |
HookInfo |
struct | HookInfo describes one Helm hook of the chart and the events it runs at. |
HookRun |
struct | HookRun records one execution of a Helm hook. |
AddonStatus |
struct | AddonStatus is what the controller last observed and did. |
Addon |
struct | Addon is software installed from a Helm chart or git manifests. |
AddonList |
struct | +kubebuilder:object:root=true |
init |
func | init registers the Addon kind with the API scheme. |
api/v1alpha1/app_types.go¶
109 lines
| Name | Kind | Summary |
|---|---|---|
AppSpec |
struct | AppSpec is the desired state: the repo's rendimiento.yaml plus the release pointer (one image per service) chosen by the pipeline or a rollback. |
Phase |
type | Phase summarizes an app's state: WaitingForBuild, Progressing, Healthy, Degraded, Suspended or Error. |
ServiceStatus |
struct | ServiceStatus is the observed state of one service (or of a database/cache run for needs:). |
AppStatus |
struct | AppStatus is what the controller last observed about an app. |
App |
struct | App is one application managed by rendimiento. |
AppList |
struct | +kubebuilder:object:root=true |
init |
func | init registers the App kind with the API scheme. |
api/v1alpha1/groupversion.go¶
16 lines
cmd/rendimiento¶
Command rendimiento runs the whole platform in one process: API and UI, CI workers and the App controller.
cmd/rendimiento/frontera.go¶
58 lines
| Name | Kind | Summary |
|---|---|---|
liveSettings |
func | liveSettings reads the platform's live settings (the boundary between organizations and its quota, see internal/ajustes): the environment's values at boot, checked as always, then whatever is saved on the Environment page over them. |
liveQuota |
func | liveQuota is the organizations' quota in force now. |
nudgeApps |
func | nudgeApps has every app reconciled again: the boundary changed. |
cmd/rendimiento/llaves.go¶
101 lines
| Name | Kind | Summary |
|---|---|---|
llavesQueCambian |
func | llavesQueCambian wires the keys that change on the Environment page (Llaves y ajustes): what tests and saves a new one, and what makes this process follow a change made in any of them. |
iaDelEntorno |
func | iaDelEntorno says on the Environment page how the platform's AI is set up. |
or |
func |
cmd/rendimiento/local.go¶
546 lines
| Name | Kind | Summary |
|---|---|---|
runLocal |
func | runLocal is rendimiento on one computer, without Kubernetes (MODE=local): one process serves the UI and the API, runs CI with the machine's container engine (containerd, or Docker), and runs the agents. |
apagarse |
func | apagarse stops rendimiento for «Apagar del todo». |
localBuildkit |
func | localBuildkit is the BuildKit daemon builds use: BUILDKIT_ADDR, or the one containerd's tools set up (rootless, then system-wide), or, under Docker, a daemon in a container of its own. |
sbin |
func | sbin adds the sbin folders to PATH when it lacks them. |
puertoGuardado |
func | puertoGuardado is the port kept in file; the first time it is want, or, when something else already listens there, a free one, which is kept so it stays the same. |
registryAnswers |
func | registryAnswers reports whether an image registry already answers there (one the machine had, which is then used). |
readOrMake |
func | readOrMake reads a value kept in a file, or makes it and keeps it there (readable only by this user). |
randomHex |
func | randomHex is 16 random bytes in hex: a password or a token. |
openWhenReady |
func | openWhenReady opens the database, waiting while its container starts. |
archivoDeAjustes |
func | archivoDeAjustes is the file this computer's service reads its settings from, for the Environment page: the one the Linux installer's unit names (SETTINGS_FILE, a service of the user), or else wsl, the WSL distribution's (a system service, reached from Windows with wsl -d). |
cmd/rendimiento/logr.go¶
11 lines
| Name | Kind | Summary |
|---|---|---|
toLogr |
func | toLogr hands controller-runtime the platform's logger, so its messages (and warnings, on the Problems page) go the same way. |
cmd/rendimiento/main.go¶
1024 lines
| Name | Kind | Summary |
|---|---|---|
env |
func | env is the environment variable key, or def when it is unset or empty. |
main |
func | main runs the platform until it is stopped, logging why if it fails. |
run |
func | run reads the configuration from the environment, connects to Kubernetes, Postgres and GitHub, wires every part of the platform together and runs them: the API and UI, the controllers, and (on the leader) the CI workers, schedulers and checks. |
tracesService |
func | tracesService is the traces service's receiver (TRACES_LISTEN) and keeper, from TRACE_SAMPLE, TRACE_SLOW and TRACE_RETENTION_DAYS. |
enviadorDeSenales |
func | enviadorDeSenales sends this installation's señales de vida: on unless SENALES=off; SENALES_EQUIPO=1 marks the team's own installations; SENALES_URL changes where they go (tests). |
produccionMCP |
struct | plataformaMCP is what the agents' platform tools (ruta.Plataforma) read and do: the store, plus logs (from the archive too) and the CI queue. |
(produccionMCP) PedirReversion |
method | |
plataformaMCP |
struct | |
(plataformaMCP) StepLog |
method | |
(plataformaMCP) QueueRun |
method | |
(plataformaMCP) CancelRun |
method | |
(plataformaMCP) Mesa |
method | |
(plataformaMCP) Libreta |
method | |
(plataformaMCP) RetryRun |
method | |
(plataformaMCP) WaitRun |
method | WaitRun wakes on the run's live events (from whichever process runs it) and checks the database every 20 seconds too, in case an event is lost. |
ptr |
func | ptr returns a pointer to a copy of v. |
splitList |
func | splitList splits a comma- or space-separated setting. |
busyRuns |
struct | busyRuns counts the builds queued or running, for the registry cleanup. |
(busyRuns) BusyRuns |
method |
cmd/rendimiento/probados.go¶
71 lines
| Name | Kind | Summary |
|---|---|---|
ajustesProbados |
func | ajustesProbados wires the settings tested before they change (Keys and settings): what tests a new registry, zone, issuer, storage class, ingress class or address against this cluster, and what restarts the platform's Deployments once one is saved, so they read it. |
reiniciarPlataforma |
func | reiniciarPlataforma restarts the platform's Deployments (SERVICES), the one answering the request last, as an update does: each rolls over, the new pods reading the environment again. |
cmd/rendimiento/local_test.go¶
67 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPuertoGuardado |
func | A port is kept: the wanted one when free, another free one when taken, and the same one afterwards either way. |
TestSbin |
func | The sbin folders join PATH once. |
TestArchivoDeAjustes |
func | The settings file is the one the installer's unit names, or the WSL distribution's, and none when neither exists. |
escritorio¶
rendimiento for Windows: the window, the icon next to the clock and the first-time assistant over rendimiento's WSL2 distribution.
escritorio/asistente.go¶
442 lines
| Name | Kind | Summary |
|---|---|---|
distro |
interface | distro is what the assistant asks of rendimiento's distribution (*wsl.Distro; a fake in tests). |
ventana |
interface | ventana is the app's window (Wails on Windows; a fake in tests). |
Asistente |
struct | Asistente takes a computer from nothing to rendimiento awake, one step at a time, and then lends the window to rendimiento's own pages. |
nuevoAsistente |
func | |
(*Asistente) Vista |
method | Vista is what the page shows now. |
(*Asistente) Instalar |
method | Instalar turns WSL on. |
(*Asistente) Importar |
method | Importar downloads and imports the distribution, and wakes it: nothing is asked in between (who administers is chosen on the setup page). |
(*Asistente) Despertar |
method | Despertar starts rendimiento. |
(*Asistente) despertar |
method | despertar wakes the distribution once; a wake that fails must not leave behind what would keep it awake. |
(*Asistente) Conectar |
method | Conectar takes the window to rendimiento's setup page, with the setup token in hand: there the person picks where their code lives (GitHub, GitLab or Bitbucket) and, by authorizing it, comes back as the first administrator. |
(*Asistente) Entrar |
method | Entrar takes the window to rendimiento's pages. |
(*Asistente) Revisar |
method | Revisar looks at the computer again, and at its clock. |
(*Asistente) empezar |
method | empezar is called once the window exists: it looks at the computer and, when rendimiento is ready to run, wakes it without asking (waking is also what keeps it awake while the app is open). |
(*Asistente) abrir |
method | abrir shows the window. |
(*Asistente) inicio |
method | inicio is "Back to the start", in the icon's menu and in the window's: it shows the window and takes it off whatever site it was left on (a forja's sign-in, another account's). |
(*Asistente) atras |
method | atras is the window's "Back": the page before this one, as in a browser. |
(*Asistente) alternar |
method | alternar is the icon's "Sleep" or "Wake up". |
(*Asistente) navegador |
method | navegador opens rendimiento in the person's browser. |
(*Asistente) escribir |
method | escribir opens, in the person's browser, the page to write to the team (decision 145): its comment goes from this computer's rendimiento. |
(*Asistente) salir |
method | salir ends the app; main lets go of the distribution after the window. |
(*Asistente) escuchar |
method | escuchar gives the icon each change of its menu, starting now. |
(*Asistente) ahora |
method | |
(*Asistente) laVentana |
method | |
(*Asistente) salirA |
method | salirA takes the window away from the assistant's page. |
(*Asistente) hacer |
method | hacer runs one task at a time, to its end, and looks at the computer again: what the page shows next is what the computer says, not what the task meant to do. |
(*Asistente) mirar |
method | mirar asks the computer where it is and ends the task, with what went wrong in it, if anything. |
(*Asistente) poner |
method | poner ends the task with what a look at the computer said. |
(*Asistente) medir |
method | medir compares the clock with the real time. |
(*Asistente) vigilar |
method | vigilar notices what happens without the app: rendimiento stopped from outside, or the setup finished in the window while the assistant waits. |
(*Asistente) vistazo |
method | |
(*Asistente) cambiar |
method | cambiar applies a change and puts the window and the icon where the new situation says. |
problemaDe |
func | problemaDe is an error as the page explains it. |
guionIr |
func | guionIr is the script that takes the window to an address unless it is already on that site: it must not reload rendimiento's pages under the person each time the window is shown. |
escritorio/bandeja_windows.go¶
71 lines
| Name | Kind | Summary |
|---|---|---|
bandeja |
func | bandeja puts rendimiento's icon next to the clock. |
atender |
func | atender fills the menu and serves its clicks, each in its own goroutine: waking takes minutes, and the menu must keep answering. |
activar |
func |
escritorio/main.go¶
16 lines
| Name | Kind | Summary |
|---|---|---|
main |
func |
escritorio/main_windows.go¶
188 lines
| Name | Kind | Summary |
|---|---|---|
main |
func | |
carpetaDe |
func | carpetaDe is where the app keeps the distribution, its downloads, the window's data and its log: %LOCALAPPDATA%\rendimiento. |
registrar |
func | registrar sends the log to rendimiento.log: a windowed program has no console. |
registro |
struct | registro puts what Wails logs (errors only, in production) in the same file. |
(registro) Print |
method | |
(registro) Trace |
method | |
(registro) Debug |
method | |
(registro) Info |
method | |
(registro) Warning |
method | |
(registro) Error |
method | |
(registro) Fatal |
method | |
ventanaWails |
struct | ventanaWails is the window, for the assistant. |
(ventanaWails) Emitir |
method | |
(ventanaWails) Ir |
method | Ir runs in whatever page the window has: WebView2 lets it go anywhere. |
(ventanaWails) Volver |
method | Volver loads the app's own page again, from any site (Wails does it by setting location.href in the page that is loaded). |
(ventanaWails) Atras |
method | Atras is the browser's Back, in whatever page the window has. |
(ventanaWails) Mostrar |
method | |
(ventanaWails) Navegador |
method | |
(ventanaWails) Salir |
method | |
seguirAdentro |
func | seguirAdentro keeps the window's program at the version rendimiento runs inside (see seguidor): it looks every 10 minutes, and the new window opens next time. |
escritorio/recursos.go¶
16 lines
escritorio/seguir.go¶
176 lines
| Name | Kind | Summary |
|---|---|---|
seguidor |
struct | seguidor keeps the window's program at the inside's version. |
(*seguidor) adentro |
method | adentro is the version rendimiento runs inside ("" when it does not say). |
(*seguidor) cliente |
method | |
(*seguidor) revisar |
method | revisar puts the window's program of the inside's version in place, when the inside is newer; it says which version it put ("" when none). |
(*seguidor) bajar |
method | |
comprobar |
func | comprobar checks a download as internal/firma.Comprobar does: SHA256SUMS signed by rendimiento's key, and the file's sum the one it lists. |
masNueva |
func | masNueva says whether nueva is a newer version than actual (three numbers each; a build that is not, "dev", follows nothing). |
tresNumeros |
func |
escritorio/textos.go¶
122 lines
| Name | Kind | Summary |
|---|---|---|
texto |
struct | texto is one thing the app says, in each language it speaks. |
T |
func | T is a text in the person's language, with its values put in. |
idiomaDe |
func | idiomaDe picks the app's language from the ones Windows lists for the person, the preferred one first ("es-MX", "en-US"). |
escritorio/vista.go¶
193 lines
| Name | Kind | Summary |
|---|---|---|
situacion |
struct | situacion is what the app knows: where the computer is, what the app is doing about it and what went wrong the last time. |
(situacion) entra |
method | entra says the window belongs to rendimiento's own pages: nothing is left for the assistant to ask or to say. |
(situacion) afuera |
method | afuera says a window that already left the assistant may stay where it is (rendimiento's pages, or a forja's while it is being connected). |
Paso |
struct | Paso is one step of the assistant's list. |
Vista |
struct | Vista is what the assistant's page shows, already in the person's language: the page only paints it. |
pasoDe |
func | pasoDe is the step a situation is on: -1 before the first look, len(pasos) when all are done. |
ver |
func | ver is the page for a situation. |
textoReloj |
func | textoReloj is the warning for a clock that is off by d. |
Menu |
struct | Menu is what the icon next to the clock says. |
menuDe |
func | menuDe is the icon's menu for a situation. |
escritorio/asistente_test.go¶
383 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCaminoCompleto |
func | |
TestAvanceMedido |
func | |
TestListaEntraYDuerme |
func | |
TestInicio |
func | A window left on GitHub's pages (a sign-in that leads nowhere) has a way back from the icon, connected or not. |
TestProblemas |
func | |
TestVistazo |
func | |
TestRelojAvisaYNoDejaEntrar |
func | |
TestGuionIr |
func |
escritorio/seguir_test.go¶
73 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestSeguir |
func | When the inside runs a newer version, the window puts its own program of that version in place, only signed; an older or same inside changes nothing. |
escritorio/textos_test.go¶
79 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestTextosCompletos |
func | Every text exists in both languages, with the same values to fill. |
TestTextosUsados |
func | Every key the code names is in the catalog, and every key of the catalog is named by the code (whole, or as " |
TestTextosDeProblemas |
func | Every problem the wsl package can report has its explanation. |
TestIdioma |
func |
escritorio/vista_test.go¶
132 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestVer |
func | |
TestVerSinHuecos |
func | No situation, in either language, asks for a text the catalog lacks. |
TestReloj |
func | |
TestMenu |
func |
escritorio/wsl¶
Package wsl keeps rendimiento's WSL2 distribution for the Windows app (instalar/wsl, published with each release): it says what is missing, turns WSL on, imports the distribution, wakes it and puts it to sleep, and reads the setup token for the setup page.
escritorio/wsl/despertar.go¶
143 lines
| Name | Kind | Summary |
|---|---|---|
(*Distro) Despertar |
method | Despertar starts the distribution, keeps it awake (WSL stops one with no wsl.exe attached) and waits until rendimiento answers. |
(*Distro) velar |
method | velar attaches a wsl.exe that keeps the distribution awake. |
(*Distro) bitacora |
method | bitacora is what to tell about a rendimiento that did not answer: its last lines in the journal. |
(*Distro) responde |
method | responde reports whether rendimiento answers on Direccion. |
(*Distro) Dormir |
method | Dormir stops the distribution: its apps, its builds and the memory it held. |
(*Distro) Soltar |
method | Soltar ends what keeps the distribution awake, without stopping it at once: for when the app exits. |
(*Distro) Configurado |
method | Configurado says whether rendimiento is installed (GET /api/setup/status): a forja connected and its first administrator. |
escritorio/wsl/ficha.go¶
38 lines
| Name | Kind | Summary |
|---|---|---|
(*Distro) Ficha |
method | Ficha is the setup token rendimiento made on its first start, for the setup page, where the person picks where their code lives (GitHub, GitLab or Bitbucket) and becomes the first administrator by authorizing it. |
escritorio/wsl/importar.go¶
187 lines
| Name | Kind | Summary |
|---|---|---|
(*Distro) Importar |
method | Importar downloads the latest release's distribution into Carpeta, checks it against the release's SHA256SUMS and imports it. |
(*Distro) sumaPublicada |
method | sumaPublicada is the distribution's SHA-256 in the release's SHA256SUMS (lines of " |
(*Distro) bajar |
method | bajar asks for a release's file; anything but a 200 is a Problema. |
(*Distro) descargar |
method | descargar brings the distribution to destino through a .part file beside it, so that destino is only ever a whole file with the right sum. |
sumaDe |
func | sumaDe is the SHA-256 of a file. |
escritorio/wsl/reloj.go¶
45 lines
| Name | Kind | Summary |
|---|---|---|
Reloj |
func | Reloj is how far this computer's clock is from the real time (positive: ahead), by the Date of an HTTPS answer; under a minute counts as zero. |
escritorio/wsl/sistema_otros.go¶
26 lines
| Name | Kind | Summary |
|---|---|---|
Sistema |
func | Sistema is the Ejecutor of this computer. |
sinSistema |
struct | |
(sinSistema) Ejecutar |
method | |
(sinSistema) Iniciar |
method | |
(sinSistema) Elevar |
method |
escritorio/wsl/sistema_windows.go¶
140 lines
| Name | Kind | Summary |
|---|---|---|
Sistema |
func | Sistema is the Ejecutor of this computer: wsl.exe and the rest, without a console window. |
sistema |
struct | |
oculto |
func | oculto keeps the program from opening a console, and asks wsl.exe for UTF-8 (the versions that can run the distribution honour it). |
(sistema) Ejecutar |
method | |
(sistema) Iniciar |
method | Iniciar's program lives until detener, not until ctx ends. |
shellExecuteInfo |
struct | SHELLEXECUTEINFOW, and the two flags of its fMask used here. |
(sistema) Elevar |
method | Elevar shows the program's window: an installer that takes minutes tells the person what it is doing, and one that asked something could never be answered hidden. |
escritorio/wsl/texto.go¶
100 lines
| Name | Kind | Summary |
|---|---|---|
texto |
func | texto reads what wsl.exe printed. |
utf16le |
func | |
mezclado |
func | mezclado reports whether b, which has NULs, also has UTF-8 text: four ASCII bytes in a row (printable, or the end of a line), which UTF-16 gives only for two uncommon characters together. |
mezcla |
func | mezcla reads UTF-16 and UTF-8 from one answer: a byte before a NUL is a UTF-16 character (ASCII and Latin-1, so wsl.exe's error codes and Spanish survive); the rest is taken as UTF-8. |
lineas |
func | lineas are the lines of s with something in them, trimmed. |
cola |
func | cola is the end of s: its last lines, up to n bytes. |
escritorio/wsl/wsl.go¶
298 lines
| Name | Kind | Summary |
|---|---|---|
Ejecutor |
interface | Ejecutor runs Windows programs for a Distro: the app gives the real one (Sistema, which never opens a console window); tests, a fake. |
Estado |
type | Estado is how far this computer is from running rendimiento: each one is a step of the app's first-time assistant, or a state of its icon. |
Problema |
struct | Problema is an error the app explains in the person's language: Clave picks the text, Detalle is what the system said (never a secret). |
(*Problema) Error |
method | |
Distro |
struct | Distro is rendimiento's WSL2 distribution on this computer. |
Nueva |
func | Nueva is the distribution with its usual names, kept in carpeta. |
(*Distro) wsl |
method | wsl runs wsl.exe to its end, within espera (0: as long as ctx lets it), and returns what it printed, read as text. |
(*Distro) pedir |
method | pedir is wsl for what should work: a refusal comes back as a Problema. |
(*Distro) dentro |
method | dentro runs a command inside the distribution, as root and without a shell of WSL's in between. |
problema |
func | problema is wsl.exe's refusal for the app: what it printed is the Detalle, and its error code picks the Clave. |
clave |
func | |
falta |
func | falta: the program is not on this computer. |
salio |
func | salio: the program ran and ended with an error of its own. |
(*Distro) hayWSL |
method | hayWSL reports whether this computer has a WSL that can run the distribution. |
(*Distro) mirar |
method | mirar asks wsl.exe, without starting anything, how far this computer is: SinWSL, SinDistro, or "" when the distribution is imported. |
(*Distro) enLista |
method | |
(*Distro) disco |
method | disco is the folder wsl --import keeps the distribution's disk in. |
(*Distro) cliente |
method | |
(*Distro) Estado |
method | Estado says where this computer is. |
(*Distro) InstalarWSL |
method | InstalarWSL turns WSL2 on (wsl --install --no-distribution, as administrator). |
escritorio/wsl/wsl_test.go¶
640 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestEstado |
func | Each Estado, by what wsl.exe and rendimiento answer. |
TestEstadoCancelado |
func | A cancelled look is not a state. |
TestInstalarWSL |
func | |
TestImportar |
func | |
TestDespertar |
func | |
TestDormirFalla |
func | |
TestFicha |
func | The setup token comes back trimmed, and never in an error. |
TestConfigurado |
func | |
TestReloj |
func | |
TestTexto |
func | |
TestSistemaFueraDeWindows |
func |
hack/codemap¶
Command codemap writes the book's code reference (docs/content/reference/ code-map.md): every package, file, type and function of the repository, with the first sentence of its doc comment.
hack/codemap/main.go¶
271 lines
| Name | Kind | Summary |
|---|---|---|
symbol |
struct | |
file |
struct | |
main |
func | |
writeFile |
func | |
goFile |
func | |
recvType |
func | |
tsFile |
func | |
firstSentence |
func | firstSentence returns the first sentence of a comment, on one line. |
cell |
func | |
anchor |
func |
hack/firmar¶
Command firmar signs a release's SHA256SUMS (decision 138).
hack/firmar/main.go¶
68 lines
| Name | Kind | Summary |
|---|---|---|
main |
func | |
fail |
func |
hack/interfaz¶
Command interfaz is the server the browser tests (web/e2e) drive: the real API and the built UI, on an empty Postgres (DATABASE_URL), as on a computer without Kubernetes (MODE=local's destination, without containers).
hack/interfaz/main.go¶
438 lines
| Name | Kind | Summary |
|---|---|---|
main |
func | |
run |
func | |
lentas |
func | lentas lets a test make rendimiento slow: POST /e2e/lenta?ruta=/api/apps&ms=11000 holds every GET of that path until ms from now (a slow answer, not a lost one: the page must not say it is offline). |
semanaDelVigia |
func | semanaDelVigia writes lines of a past week to the platform's log, so the lookout always has something to find. |
modeloVigia |
struct | modeloVigia is the lookout's fake model: a finding for each of the first three signals it is given, the third with no work suggested. |
(modeloVigia) Complete |
method | |
guardarEstado |
func | guardarEstado writes Playwright's storage state: the session cookie. |
credenciales |
struct | credenciales keeps the fake App's credentials in memory. |
(*credenciales) Load |
method | |
(*credenciales) Save |
method | |
repo |
struct | repo is a fake repository: its files by path. |
(*repo) commit |
method | commit names the repository's only commit: the one of its files. |
repositorios |
func | repositorios are the fake installation's repositories: one per example, carrying it as its rendimiento.yaml, and a Node app without one (the wizard proposes a rendimiento.yaml for it). |
githubFalso |
func | githubFalso answers the GitHub API calls the wizard makes: the App's installations and tokens, the installation's repositories, and their trees and files. |
blobSHA |
func | blobSHA names a file's contents, as git does (any stable name will do). |
hack/undoc¶
Command undoc lists exported Go declarations without a doc comment, the ones make docs-codemap would show with an empty summary.
hack/undoc/main.go¶
53 lines
| Name | Kind | Summary |
|---|---|---|
main |
func |
instalar¶
Package instalar is the installer for one computer, which rendimiento serves at /instalar so that curl -fsSL https://rendimiento.ai/instalar | sh installs it.
instalar/instalar.go¶
11 lines
instalar/instalar_test.go¶
13 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestScript |
func | The script served at /instalar is the POSIX shell installer. |
instalar/servicio_test.go¶
298 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestSettingsFile |
func | The service reads the person's settings file, which wins over the unit's own values; the first install makes the file, saying how to use it, and no install after that writes it again. |
TestSinAdministrador |
func | Nobody has to be named to install: without a terminal (curl | sh in a script) it does not ask, the service has no ALLOWED_USERS, and the end says to finish on the setup page with the setup token. |
TestAdministradoresDeAntemano |
func | Scripts may still name the first administrators ahead, in any of the names Members takes; RENDIMIENTO_GITHUB is the old name of the setting. |
TestForjaDeAntemano |
func | The forja chosen ahead opens the setup page on it, with the setup token in the address; GitLab and Bitbucket get the callback to set, which is this computer's plain http address. |
instalar/vigente_test.go¶
25 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestNoPinnedReleaseInInstallCommands |
func | The install commands people copy never pin a release: the installer and Helm take the latest, so a number written there only goes stale (the README still said 0.1.3 when 0.1.5 was out). |
internal/actualizar¶
Package actualizar knows which rendimiento is published: once a day it asks GitHub for the latest release, and says whether it is newer than the one running, whether it only brings fixes (the same minor version: it may install itself, decision 138), and whether it is signed (only a signed one is ever installed).
internal/actualizar/actualizar.go¶
137 lines
| Name | Kind | Summary |
|---|---|---|
Publicada |
struct | Publicada is a published release, as the card shows it. |
Version |
func | Version is a version as three numbers; ok is false for one that is not (a build from a branch: "dev"). |
Comparar |
func | Comparar says whether nueva is newer than actual, and whether it only brings fixes: the same major and minor version (0.2.0 → 0.2.1). |
Consultor |
struct | Consultor asks GitHub for the latest release, keeping the answer a day. |
(*Consultor) Ultima |
method | Ultima is the latest published release; refrescar asks GitHub now. |
(*Consultor) consultar |
method |
internal/actualizar/programa.go¶
228 lines
| Name | Kind | Summary |
|---|---|---|
Programa |
struct | Programa changes rendimiento's own program on a computer (Linux, and the WSL distribution under Windows): it downloads a release, checks its signature and sum, keeps the program that runs as the previous one, puts the new one in its place, and exits so the service starts it again. |
Marca |
struct | Marca is the record of an update in DATA_DIR, read at the next start. |
(*Programa) marca |
method | |
(*Programa) anterior |
method | |
(*Programa) Anterior |
method | Anterior is the version kept as the previous one ("" when none). |
(*Programa) Fallida |
method | Fallida is the last version that did not stay up here ("" when none): updating by itself never installs it again. |
(*Programa) arch |
method | |
(*Programa) bajar |
method | |
(*Programa) Instalar |
method | Instalar puts version in place of the running program (actual): only a newer version, signed by rendimiento's key. |
(*Programa) Regresar |
method | Regresar puts the previous version back, only when it is lower than the one running. |
(*Programa) cambiarAAnterior |
method | |
(*Programa) guardar |
method | |
(*Programa) AlArrancar |
method | AlArrancar reads the record of an update when rendimiento starts. |
internal/actualizar/actualizar_test.go¶
55 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestComparar |
func | |
TestConsultor |
func |
internal/actualizar/programa_test.go¶
102 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPrograma |
func | A signed release takes the program's place and the old one is kept; a version that keeps failing to start goes back by itself; a person goes back only down; an unsigned or changed release is never installed. |
internal/addon¶
Package addon renders add-ons (Helm charts or kustomize folders in git) into Kubernetes objects.
internal/addon/catalog.go¶
160 lines
| Name | Kind | Summary |
|---|---|---|
Field |
struct | Field is one setting a catalog entry offers in its install form. |
CatalogEntry |
struct | CatalogEntry is something that can be installed with a few settings. |
HelmSourceTemplate |
struct | HelmSourceTemplate is a catalog entry's chart and default version. |
internal/addon/gitops.go¶
420 lines
| Name | Kind | Summary |
|---|---|---|
Definition |
struct | Definition is one add-on as written in addons/ |
ParseDefinition |
func | ParseDefinition reads and validates one addons/ |
(*Definition) Validate |
method | Validate checks names and that exactly one source (helm or git) is set. |
(*Definition) Marshal |
method | Marshal writes the definition as it is stored in git. |
(*Definition) Spec |
method | Spec is the Addon spec the definition asks for. |
GitHubFetcher |
struct | GitHubFetcher reads repositories through the GitHub App. |
(GitHubFetcher) Fetch |
method | Fetch implements GitFetcher through the GitHub App installation that owns repo. |
Syncer |
struct | Syncer makes the Addon objects match the definitions in the gitops repo. |
SyncResult |
struct | SyncResult is the outcome of one pass of Syncer.Sync, shown on the Add-ons page. |
(*Syncer) init |
method | init makes the trigger channel once. |
(*Syncer) Trigger |
method | Trigger asks the loop to sync soon (e.g. |
(*Syncer) Serve |
method | Serve takes the other processes' Trigger and Last (see Remote) until ctx ends. |
(*Syncer) Last |
method | Last returns the most recent sync's outcome. |
(*Syncer) Loop |
method | Loop syncs every few minutes and whenever triggered, until ctx ends. |
(*Syncer) Sync |
method | Sync makes the Addon objects match the definitions at the head of the gitops repository: it creates and updates them, and deletes those whose file is gone (their software keeps running unless marked for uninstall). |
(*Syncer) read |
method | read loads the add-on definitions from the gitops repository's add-ons folder (one YAML file each), with the commit read; files that cannot be used are returned apart, with why (invalid, or a name already taken). |
(*Syncer) apply |
method | apply creates or updates one Addon; it reports whether anything changed. |
equalSpec |
func | equalSpec reports whether two add-on specs say the same thing. |
internal/addon/render.go¶
364 lines
| Name | Kind | Summary |
|---|---|---|
GitFetcher |
interface | GitFetcher reads a folder of a GitHub repository at a commit. |
Result |
struct | Result is a rendered add-on. |
Hook |
struct | Hook is one Helm hook: an object (usually a Job) run at lifecycle events. |
(Hook) Has |
method | Has reports whether the hook runs at event. |
(Hook) HookPolicy |
method | HookPolicy reports whether the hook has a delete policy; hooks without one get Helm's default, before-hook-creation. |
Renderer |
struct | Renderer renders add-ons. |
(*Renderer) Render |
method | Render produces the add-on's objects (and hooks) from its Helm or git source. |
(*Renderer) renderHelm |
method | renderHelm renders a Helm chart add-on: it downloads the chart version from its repository and renders its templates with the add-on's values, keeping its hooks apart to run them like Helm does. |
(*Renderer) chart |
method | chart downloads a chart from a classic (index.yaml) Helm repository. |
(*Renderer) get |
method | get downloads a URL (2 minutes at most by default). |
(*Renderer) renderGit |
method | renderGit renders an add-on kept in a git repository: the folder at the revision, as plain manifests or a kustomization (Build). |
Build |
func | Build renders a folder: kustomize if it has a kustomization file, otherwise every YAML file in it. |
Decode |
func | Decode splits multi-document YAML into objects, expanding Lists and skipping empty documents. |
internal/addon/gitops_test.go¶
57 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestDefinition |
func |
internal/addon/render_test.go¶
177 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestRenderHelm |
func | |
TestRenderGitKustomize |
func | |
TestBuildPlainManifests |
func |
internal/agentes¶
Package agentes holds the agents that work inside the platform (ROLE=agents), woken by what happens in it rather than by a person's session.
internal/agentes/aprender.go¶
93 lines
| Name | Kind | Summary |
|---|---|---|
Factor |
struct | Factor is what the estimates are multiplied by, and from how many encargos it was learned (X is 1 and N under LearnFrom when it has not learned yet). |
Learned |
struct | Learned is the factors, by difficulty and for all of them together. |
(Learned) For |
method | For is the factor for an encargo of difficulty d: that difficulty's once it has LearnFrom encargos, else all of them together once those are LearnFrom, else 1 (the table as it is). |
Learn |
func | Learn reads the coding agent's record: each encargo it delivered (the work finished) against what the table prices its difficulty at, cost(d). |
factorOf |
func | factorOf is the middle of the ratios (the median: one encargo that went badly does not move it much), kept between minFactor and maxFactor and rounded to a tenth. |
(Factor) Scale |
method | Scale is an estimate multiplied by a factor. |
internal/agentes/clasificar.go¶
239 lines
| Name | Kind | Summary |
|---|---|---|
ClasificadorStore |
interface | ClasificadorStore is what the classifier reads and keeps. |
Clasificador |
struct | Clasificador reads each new comment people wrote to the team (decision 145) with the book's contents, the Ruta's open to-dos and decisions, and the comments before it in view, and keeps what it makes of it: its class (it exists already, new, a failure, or nonsense), a one-line summary, what it matches, the earlier comment it groups with, and a draft answer for a person to rewrite and send. |
(*Clasificador) Run |
method | Run classifies new comments every 30 seconds until ctx ends, and once an hour deletes the emails no longer needed (30 days after the answer). |
respuestaIA |
struct | respuestaIA is the JSON the model answers with. |
(*Clasificador) Clasificar |
method | Clasificar classifies one comment and keeps the answer; when the model cannot answer, or answers something else, it keeps why, so the comment shows unclassified and is not asked about again. |
leerRespuesta |
func | leerRespuesta reads the model's JSON, and checks its class. |
(*Clasificador) contexto |
method | contexto is what the model sees besides the comment: the book's pages, the Ruta's open to-dos and recent decisions, and the comments before this one, each with the reference it may answer with. |
(*Clasificador) system |
method |
internal/agentes/codigo.go¶
1305 lines
| Name | Kind | Summary |
|---|---|---|
CoderStore |
interface | CoderStore is what the coding agent reads and keeps. |
Fixes |
interface | Fixes runs the app's declared fixes (arreglos.Service). |
Repos |
interface | Repos is the apps' repositories on their forja (GitHub, GitLab or Bitbucket: the platform's Repos sends each call to its own). |
Coder |
struct | Coder is the platform's coding agent: it does encargos on a branch of the app's repository, through its forja's API, and tests them with the platform's own CI, the way a person's agent does; it never runs code itself, and never touches the default branch. |
sharedCargo |
struct | sharedCargo is a key's open cargo while the coding agent does one or more encargos in it: handed over when the last one ends, with what each became. |
(*Coder) Run |
method | Run does the encargos it should until ctx ends: each organization's queue in its order, as many at once as the organization lets it (one by default), never two of the same app (Pick). |
Slot |
struct | Slot is an encargo the coding agent does: its organization and app. |
Pick |
func | Pick chooses which candidates to start now, given the ones running (by encargo): each organization's queue in its order, while it does fewer than its organization lets it at once (1 to store.MaxCodeConcurrency), and never an encargo of an app it already does one of, in the same organization: two branches of one repository at once would step on each other's runs. |
(*Coder) takeCargo |
method | takeCargo is the cargo an encargo is done in: the key's open one when the coding agent does another of that organization now, else a new one. |
(*Coder) handOver |
method | handOver adds what became of an encargo to its cargo, and hands the cargo over when it was the last one in it. |
(*Coder) watchStop |
method | watchStop cancels the work on an encargo when a person asks to stop it, or it is dropped (store.ShouldStop), looking every Poll. |
(*Coder) recover |
method | recover gives back the encargos the coding agent had when the platform stopped (an update): their branch keeps what it committed. |
(*Coder) say |
method | |
branchFor |
func | branchFor is an encargo's branch (store.RamaDeEncargo): fix/ for one about a failed run, feature/ otherwise. |
job |
struct | job is one encargo being done: the repository as it is on the branch with what changed since the last commit, and what it spent. |
(*Coder) Do |
method | Do does one encargo: takes it in a cargo, works on its branch, and delivers it or gives it back. |
(*job) giveBack |
method | |
(*job) work |
method | work prepares the branch and talks with the model until it delivers, gives up, or runs out of turns or budget. |
(*job) nextCost |
method | nextCost is what the next call to the model would cost, by the ones before: each reads all the conversation so far, so it costs about the last one plus what the last one grew. |
(*job) commitLeft |
method | commitLeft keeps what changed since the last commit on the branch, for the person's agent to go on from, marked as untested; it answers the commit ("" when there was nothing to keep, or it may not). |
(*job) brief |
method | brief is the first message: the encargo, the app, and the repository's own instructions for agents. |
(*job) fixList |
method | fixList is the app's declared fixes, one a line: name, folder, what it runs and what it may write. |
(*job) tools |
method | tools are the agent's tools: run_fix only when the app declares fixes, with them in its description. |
(*job) top |
method | top lists the repository's top-level files and folders. |
(*job) system |
method | |
(*job) fixRule |
method | fixRule tells the model of run_fix, when the app declares fixes. |
schema |
func | |
str |
func | |
num |
func | |
(*job) tool |
method | tool runs one tool call: its answer, and whether it is an error. |
(*job) doing |
method | doing keeps what it does now ("tool:what") for the queue's page: the interface says it in the person's language (web/src/components/cola.tsx). |
(*job) fetchBig |
method | fetchBig brings in a file the branch's snapshot left out for its size (Files skips those over maxFileSize), so read_file and edit_file find it by its path. |
(*job) file |
method | file is a file as it is now: with the changes, without the removed. |
(*job) paths |
method | paths are the files as they are now, sorted. |
under |
func | |
(*job) list |
method | |
(*job) read |
method | |
(*job) readAt |
method | readAt reads a file as it is at ref (another branch, or a commit). |
lines |
func | lines is a file whole, or from line to line, cut to readChars. |
(*job) search |
method | |
(*job) marked |
method | marked are the changed files that still have a conflict's marks. |
(*job) mergeDefault |
method | mergeDefault merges the default branch into the branch, in the job's copy: what only the default branch changed comes in; where both changed a file, it is joined (mezcla.Merge), with git's marks where both changed the same place, for the model to resolve. |
(*job) runFix |
method | runFix runs a declared fix on the branch with the uncommitted changes: what it writes joins them, for the next commit_and_test. |
(*job) commit |
method | commit commits what changed to the branch. |
(*job) commitAndTest |
method | commitAndTest commits and waits for the platform's run on the commit. |
(*job) waitRun |
method | waitRun waits for the run on a commit to start (noRunWait) and end (waitEnd), marking the encargo as waiting on it meanwhile. |
(*job) failure |
method | failure is how a run failed: its failed steps with the end of their logs, and the diagnostician's explanation if it has one. |
(*job) deliver |
method | deliver hands the encargo over, once the latest commit's run passed. |
internal/agentes/codigo_pregunta.go¶
762 lines
| Name | Kind | Summary |
|---|---|---|
AskStore |
interface | AskStore is where the coding agent keeps its questions (store.Store): when the coder's Store is one, it offers the ask tool. |
CoderPlataforma |
interface | CoderPlataforma is what the coding agent's read-only tools read beyond its store (store.Store): only ever about the encargo's own app. |
(*Coder) asks |
method | |
(*job) say |
method | say is the job's c.say. |
(*job) complete |
method | complete asks the model one turn, and again (up to aiTries) when its API failed for a reason that passes: a reset connection, a 5xx, a 429. |
(*job) ask |
method | ask stops the work to ask the person: what changed is committed on the branch (tested by CI meanwhile), and the encargo asks until answered. |
(*job) resumedHead |
method | resumedHead is the branch's head when the job resumes after a question (false when it does not, or the branch is gone). |
(*job) resumeBrief |
method | resumeBrief is what the first message adds when the encargo resumes after a question: the question, the answer and the notes. |
orElse |
func | |
PassNote |
func | PassNote is what an encargo that asked says when it goes to the person's own agent: the question and its options, in lang. |
(*Coder) passUnanswered |
method | passUnanswered gives the person's own agent the encargos whose question nobody answered in store.AskWait, with the question. |
(*job) moreTools |
method | moreTools are the tools added to coderTools: ask when questions can be kept, and the app's read-only views when the platform is there. |
(*job) sees |
method | sees says whether a read-only tool can be offered. |
(*job) moreTool |
method | moreTool runs one of moreTools; ok is false for any other name. |
redact |
func | redact leaves out the lines that look like a credential. |
spanOf |
func | |
(*job) runs |
method | runs lists the app's recent runs with their steps. |
(*job) stepLog |
method | stepLog is the end of a step's log, of a run of the encargo's app only. |
(*job) slowRequests |
method | slowRequests are the app's slow requests in the Registro and the traces. |
traceOf |
func | traceOf says whether a trace went through the app's services only as far as its first service: a request kept for another app is not shown. |
(*job) appStatus |
method | appStatus is the app's releases, open problems and lookout findings. |
(*job) seeRule |
method | seeRule tells the model of its read-only tools, and that a lookout's encargo starts by checking the numbers it is about. |
vigiaBorn |
func | vigiaBorn says whether an encargo was made from a lookout's finding. |
(*job) waitEnd |
method | waitEnd waits for a run to end, marking the encargo as waiting on it: as long as the run takes (it spends nothing), up to runWaitMax. |
(*job) clusterSign |
method | clusterSign is what in a failed run says the cluster failed it ("" when nothing does): its message, its failed steps' messages and logs' ends. |
(*job) rerun |
method | rerun runs a run the cluster failed once more: with the platform's retry (what failed runs again, in the same run), or without one, an empty commit. |
retryRepos |
struct | retryRepos is a forja that tries a call once more when it failed for a reason that passes (a dropped connection, a 5xx, a 429). |
forjaPassing |
func | forjaPassing says whether a forja's error passes by itself. |
once |
func | |
(retryRepos) Files |
method | |
(retryRepos) BranchSHA |
method | |
(retryRepos) CreateBranch |
method | |
(retryRepos) CommitFiles |
method | |
(retryRepos) MergeBase |
method | |
(retryRepos) ChangedFiles |
method | |
(retryRepos) FileAt |
method | |
(retryRepos) CommitMerge |
method |
internal/agentes/cuentas.go¶
57 lines
| Name | Kind | Summary |
|---|---|---|
causeOfGiveUp |
func | causeOfGiveUp is the cause in a give_up call ("" when it gave none, or one it may not choose: the note is classified when read). |
(*job) errCause |
method | errCause is the cause of an error that ended its work: before it called the model the forja's (preparing the branch and reading its files), then the model's (it failed, refused or stopped using its tools), except running out of turns or time. |
internal/agentes/diagnostico.go¶
494 lines
| Name | Kind | Summary |
|---|---|---|
Store |
interface | Store is what the diagnostician reads and keeps (the platform's store). |
Model |
interface | Model asks the organization's model (the AI gateway). |
Changes |
interface | Changes lists the files that changed between two commits, on the app's forja (GitHub's compare, GitLab's compare, Bitbucket's diffstat). |
Diagnostician |
struct | Diagnostician explains failed runs: why each failed and how to fix it. |
(*Diagnostician) Run |
method | Run diagnoses failed runs (and the ones people ask for) every 30 seconds until ctx ends. |
(*Diagnostician) Diagnose |
method | Diagnose explains one failed run and keeps the answer. |
(*Diagnostician) openEncargo |
method | openEncargo opens an encargo for an explained failure when the organization asked for it (branches, or all), the way "Ask an agent" does by hand: the failed steps and the explanation, for an agent to fix. |
short |
func | |
(*Diagnostician) escalation |
method | escalation is who answers a new failure for the organization ("" for its usual provider): the one it chose, while this month's escalations are under its limit. |
(*Diagnostician) remember |
method | remember keeps a stronger model's answer as an unconfirmed known failure, so the local model reads it next time; judging the diagnosis confirms or corrects the same entry. |
(*Diagnostician) system |
method | |
(*Diagnostician) context |
method | context is what the model reads: the run, its failed steps with the end of their logs (lines that look like secrets left out), and the files changed since the branch's last good run (the default branch's, for a branch with none yet); and the failure's signature, its telling line. |
telling |
func | telling are the lines of a log that say what went wrong, the last first, at most five; summary lines only if nothing else does. |
(*Diagnostician) known |
method | known is what the Ruta knows of failures like this one: the known failures (tagged falla-conocida) sharing the most words with the signature, the step messages and the app's name, at most three. |
clean |
func | clean is the last n lines of a log, without color codes and without the lines that look like secrets (they may go to an outside provider). |
internal/agentes/estimar.go¶
218 lines
| Name | Kind | Summary |
|---|---|---|
EstimatorStore |
interface | EstimatorStore is what the estimator reads and keeps. |
Estimator |
struct | Estimator rates each new encargo: how hard it is (1 to 10), what the platform's AI would spend doing it, and so who should: the platform's AI when it is under the organization's amount, the person's own agent (paid by the month, not by the call) when it is over. |
(*Estimator) Run |
method | Run estimates new encargos every 30 seconds until ctx ends. |
(*Estimator) Cost |
method | Cost is what the platform's AI would spend on an encargo of difficulty d. |
(*Estimator) Estimate |
method | Estimate rates one encargo and keeps the answer; when the model cannot answer, it keeps why, so the encargo is not asked about again. |
(*Estimator) Learned |
method | Learned is the factors learned from the organization's coding agent (none when its record cannot be read). |
(*Estimator) say |
method | |
(*Estimator) platformMay |
method | platformMay says whether the platform's coding agent may take an encargo about a failed run, by whose branch it failed on: a person's branch is theirs, so the encargo goes to their own agent; an encargo's branch goes first to the kind of agent that made it (the coding agent, or a person's). |
truncate |
func | |
(*Estimator) system |
method | |
(*Estimator) Precio |
method | Precio is what the platform's AI would spend on an encargo of difficulty d for the organization, as Estimate prices it (the table, corrected by what the coding agent spent when set.EstimateLearn), and so who should do it: the platform's AI up to the organization's amount, the person's own agent above it. |
internal/agentes/platica.go¶
359 lines
| Name | Kind | Summary |
|---|---|---|
PlaticaStore |
interface | PlaticaStore is what the conversations' AI reads: the Ruta, to find the entries related to the one talked about. |
Platicador |
struct | Platicador is the AI of a conversation about a Ruta entry (a plática): it reads the entry, the entries related to it and the book's pages that match, and answers the last message, keeping «la idea hasta ahora» (what was decided, and what is still to decide). |
Respuesta |
struct | Respuesta is the AI's answer to a conversation: its text, the idea as it stands now ("" when it gave none: the idea stays as it was), what it read, and the call (provider, model, cost). |
(*Platicador) FaltaDecidir |
method | FaltaDecidir starts each line of the idea that is still to decide, in the conversation's language. |
Cercar |
func | Cercar makes text safe to put between the prompt's fences: any of their tags in it loses its angle bracket. |
palabras |
func | palabras are the significant words of a text (four letters or more, not the common ones), lowercase, without repeats, in order. |
init |
func | |
(*Platicador) Contexto |
method | Contexto is what the AI reads besides the conversation: the entries related to the one talked about (at most five, never lo vivido, people's stories) and the book's pages whose titles share its words (at most three), with the references it reports as read. |
leidos |
func | leidos are the references of what the AI read: the entry, the related ones, and the book's pages with their titles ("libro:guide/ai/|AI"). |
firma |
func | firma is how a message is signed in the transcript the AI reads. |
(*Platicador) documento |
method | documento is the user turn: the entry, what is related, the idea so far and the conversation, each between its fence, every text people wrote passed through Cercar. |
(*Platicador) idioma |
method | |
(*Platicador) sistemaRespuesta |
method | |
(*Platicador) Responder |
method | Responder asks the AI the conversation chose (provider: local, own or platform) to answer its last message. |
Propuesta |
struct | Propuesta is what the AI makes of a conversation when people say the idea is ready: what was decided, and the encargos that carry it out. |
PropuestaEncargo |
struct | PropuestaEncargo is one proposed encargo: its title, app (one of the organization's; "" when the AI could not tell), difficulty (1 to 10, as the estimator rates), detail, and the earlier ones (by their number in the proposal, from 1) it comes after. |
(*Platicador) sistemaPropuesta |
method | |
(*Platicador) Proponer |
method | Proponer asks the AI for the encargos that carry out what the conversation decided, checked: apps only of apps, difficulties within 1 to 10, and each waiting only for earlier ones. |
internal/agentes/resumen.go¶
206 lines
| Name | Kind | Summary |
|---|---|---|
SummaryStore |
interface | SummaryStore is what the summary reads and keeps. |
Summarizer |
struct | Summarizer writes the day's summary of an organization: the facts the platform recorded that day (releases, runs, problems, the bitácora, encargos), told in a few lines by the platform's AI through its gateway (its caps and its fall back to the local model). |
(*Summarizer) Start |
method | Start writes a day's summary in the background, once at a time per organization, day and language; it reports whether it started one. |
(*Summarizer) Write |
method | Write writes and keeps a day's summary. |
(*Summarizer) tell |
method | tell asks the model to tell the facts in a few lines, each about one app (or the organization). |
summaryLines |
func | summaryLines reads the lines of the model's answer: the JSON array in it, or, when the answer was cut, the lines that came whole before the cut. |
countLines |
func | countLines is the summary without a model: each app's numbers, only those that are not zero. |
internal/agentes/traducir.go¶
90 lines
| Name | Kind | Summary |
|---|---|---|
Translator |
struct | Translator turns a diagnosis into the reader's language, so it is diagnosed once and read in either. |
(*Translator) Translate |
method | Translate is text, written in from, in the language to (es or en), keeping its Markdown, code, log lines, names and numbers as they are. |
(*Translator) TranslateTo |
method | TranslateTo is a short text in any language, put in to (es or en); text already in to comes back as it is. |
internal/agentes/vigia.go¶
485 lines
| Name | Kind | Summary |
|---|---|---|
VigiaStore |
interface | VigiaStore is what the lookout reads and keeps. |
Vigia |
struct | Vigia is the lookout (el vigía): once a week, or when an administrator asks, it reads what the platform recorded (step times, failures and retries, each app's runs, the log's warnings and errors, slow requests, open problems and the interface's use), added up first into signals with a stable key, and asks the model which few are worth a person's time. |
(*Vigia) now |
method | |
(*Vigia) Run |
method | Run reviews each week while it is on, until ctx ends: it looks every hour whether a week went by since the last review. |
(*Vigia) toca |
method | toca is whether the weekly review is due. |
(*Vigia) Pedir |
method | Pedir starts a review that a person asked for, in the background; it answers at once (store.ErrVigiaOcupado when one is going on). |
(*Vigia) Revisar |
method | Revisar reviews the week until now and keeps what it found. |
(*Vigia) revisar |
method | |
Senal |
struct | Senal is one thing the lookout noticed, added up from what the platform recorded: its key (the same thing gives the same key next week), the app it is about, the fact in a line (for the model), how much it weighs, and whether it could call for work (or is only a fact, like good news). |
Senales |
func | Senales are the week's signals, the weightiest first: steps that decide how long runs take, that got slower or faster, that fail, are retried or stumble; apps whose runs all passed or that fail more; the log's repeated warnings and its errors; slow routes; open problems; and pages that got slow, or that nobody opened in two weeks (uso14 are the last 14 days of use, uso35 the last 35). |
tasa |
func | |
orDash |
func | |
siApp |
func | |
huella |
func | huella is a short stable name of a log message: its key does not carry the message itself. |
dur |
func | dur says seconds the way people read them: 45 s, 6 min, 1 h 20 min. |
dolares |
func | |
limpiar |
func | limpiar is a log message the model may read: without long tokens, cut short; false when it looks like a secret (then it is not read at all). |
(*Vigia) system |
method | |
(*Vigia) contexto |
method | contexto is what the model reads: the signals, and what people already decided (so it does not propose it again in other words). |
hallazgoIA |
struct | hallazgoIA is one finding as the model writes it. |
Hallazgos |
func | Hallazgos reads the model's answer: the findings about signals it was given, each signal once, at most MaxHallazgos, with what looks like a secret left out. |
internal/agentes/clasificar_test.go¶
104 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestClasificador |
func | The classifier keeps the model's class, summary and draft, only the references it was shown, and a group only among earlier comments; a comment's words reach the model as data between tags; nonsense keeps no draft; an answer that does not read is kept as why. |
internal/agentes/codigo_pregunta_test.go¶
534 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCoderAsksWaitsAndResumes |
func | The coding agent asks the person and stops without spending more: what it changed is committed (and tested meanwhile, no [skip ci]), the question keeps its options, its notes and what it spent. |
TestCoderPassesUnansweredQuestions |
func | A question nobody answers in 3 days goes to the person's own agent, with the question, its options and the agent's notes. |
TestCoderSeesOnlyItsApp |
func | A lookout's encargo: the agent is told to verify the numbers first, and its read-only tools show the encargo's app only: its runs with step durations, a step's log (another app's run is refused), its slow requests and its status, never another app's. |
TestCoderRefusesAnotherOrgsApp |
func | An encargo whose app is another organization's is not worked on at all: no model call, no tool, given back. |
TestCoderRetriesTheModel |
func | A connection the model's API reset is tried again (up to 3 more times) instead of giving the encargo up; a fourth failure in a row gives it back, and an error that does not pass is not tried again. |
TestCoderKeepsWaitingForALongRun |
func | A run that takes longer than runs usually do is waited for, spending nothing (no turn of the model meanwhile), instead of giving up. |
TestCoderRunsAgainWhatTheClusterFailed |
func | A run the cluster failed (etcd timed out) runs once more with the platform's retry before it counts; one the code failed does not. |
TestClusterSigns |
func | What says the cluster failed a run, and what does not. |
TestForjaTriesOnceMore |
func | A forja's call that failed for a reason that passes (a 502, a reset connection) is tried once more; a 404 or a second failure is not. |
TestPickTakesALookoutsEncargo |
func | A lookout's encargo goes to the coding agent like any other (decision 4): the scheduler does not leave it out for having no run. |
internal/agentes/codigo_test.go¶
489 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCoderDelivers |
func | The coding agent searches, edits, commits and reads why the run failed, fixes it, and delivers once a run passed, with the branch and the run. |
TestCoderStopsAtTwiceTheEstimate |
func | Before a turn that would pass twice the estimate it stops (Ruta 77), in the middle of an edit: what it changed is committed on its branch marked untested, and the encargo goes to the person's own agent with a note. |
TestNextCost |
func | The next turn is guessed from the ones before: the last one, plus what it grew. |
TestCoderFixesTheFailedRunsBranchInPlace |
func | An encargo about a run that failed on a person's branch is worked on that branch itself (Ruta 130): no copy of it, and the link is its own pull request. |
TestCoderFixesAnEncargosBranchInPlace |
func | A failure on an encargo's own branch is fixed on that branch: no copy of it, and the link is its own pull request. |
TestCoderMergesTheDefaultBranch |
func | A conflict with the default branch is resolved on the branch itself without git: merge_default_branch brings in what only main changed and marks where both did; a commit with a mark left is refused; once resolved, the commit is a merge with main as its second parent. |
TestCoderReadsAndEditsABigFile |
func | A file left out of the branch's snapshot for its size (a package-lock.json over 256 KB) is still read and edited by its path, from the branch. |
TestCoderRunsAFix |
func | The coding agent sees the app's declared fixes, runs one on its branch with what it changed, and the file it wrote goes in its next commit; the encargo's history says so. |
internal/agentes/cola_test.go¶
107 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPick |
func | The scheduler: one at a time by default, in the queue's order; with more allowed, up to that many at once, never two of one app, and an encargo whose app is busy waits while one of another app goes first. |
TestCoderSharesTheCargo |
func | Encargos done at once share their key's cargo: taken once, handed over when the last one ends, with what became of each. |
TestCoderStops |
func | A person stops the encargo it does: it lets go of it at once, gives it back to them saying so, and says what it was doing until then. |
internal/agentes/cuentas_test.go¶
82 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCoderRecordsWhyItGaveBack |
func | The coding agent says why it gave an encargo back: its brake, the cause the model gave with give_up (not one it may not choose), a person's stop. |
TestErrCause |
func | An error that ends its work: the forja's before it called the model, the model's after, neither when it ran out of turns or time. |
internal/agentes/diagnostico_test.go¶
336 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestDiagnose |
func | A failed run's diagnosis: the model reads the failed step and the end of its log (secret-looking lines left out) and the changed files, in the app's organization; its answer is kept. |
TestKnownFailures |
func | The diagnostician keeps the failure's telling line, and passes the model the known failures of the Ruta that look alike (not the others). |
TestEscalation |
func | A new failure (nothing alike in the Ruta) goes to the stronger model the organization chose, at most its limit a month, and the answer becomes an unconfirmed known failure; a known one stays with the usual model. |
TestOpenEncargo |
func | An explained failure opens an encargo when the organization (or the app, which wins) asks for it: on branches only, or everywhere; never twice. |
internal/agentes/estimar_test.go¶
174 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestEstimate |
func | An encargo under the organization's amount is for the platform's AI, one over it for the person's own agent; an answer with no difficulty is kept as such, so it is not asked again. |
TestEstimateByWhoseBranch |
func | A small fix of a failed run goes to the platform's AI only when the branch is not a person's: on main, or on a branch the coding agent made. |
TestLearn |
func | The factor is the middle of what the coding agent spent over the table: a difficulty's own from 5 encargos, else all of them together from 5, else none; one it gave back says nothing, and it stays within bounds. |
TestEstimateLearns |
func | With learning on, the estimate is the table times the factor, which the reason says, and the route follows the corrected number; off, the table. |
internal/agentes/platica_test.go¶
149 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPlaticadorResponde |
func | The conversation's AI answers through the provider the conversation chose, keeps the idea in lines (what is still to decide last), and says what it read: the entry, the related ones (never lo vivido) and the book's pages that match. |
TestPlaticadorPropone |
func | Its proposal keeps apps only of the list, difficulties within 1 to 10, and each encargo after earlier ones only; with nothing, it is an error. |
TestCercar |
func | Fencing takes apart every tag of the prompt, however it is written. |
internal/agentes/resumen_test.go¶
89 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestSummaryOfADay |
func |
internal/agentes/traducir_test.go¶
61 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestTranslate |
func | A diagnosis is translated keeping its Markdown and code; readers asking for the same translation at once share one call to the model. |
internal/agentes/vigia_test.go¶
260 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestSignalsOfAWeek |
func | |
TestFindingsFromTheModel |
func | |
TestTheLookoutReviews |
func | |
TestTheWeeklyReviewIsDue |
func |
internal/ajustes¶
Package ajustes is the platform's settings that change while it runs: the boundary between organizations and their quota.
internal/ajustes/ajustes.go¶
316 lines
| Name | Kind | Summary |
|---|---|---|
Def |
struct | Def is one live setting: its variable, the group it is shown in, and whether it only means something on a cluster. |
Known |
func | Known says whether key is a live setting. |
Values |
type | Values are settings by their variable; a missing or empty one is unset. |
FromEnv |
func | FromEnv reads the live settings from the environment (the ConfigMap). |
Boundary |
struct | Boundary is what the settings make: the network boundary between organizations and the quota of each one (zero: no limit). |
Read |
func | Read checks the settings together and works out the boundary. |
IngressNamespaceOf |
func | IngressNamespaceOf is the namespace the boundary lets the ingress controller in from: the setting, or the usual one for the class. |
Split |
func | Split reads a list written with commas or spaces. |
isLabel |
func | |
Saved |
interface | Saved are the settings someone saved on the Environment page. |
Holder |
struct | Holder keeps the live settings of one process: the environment's at boot, then each saved value over it, read again every 15 seconds. |
state |
struct | |
(*Holder) Start |
method | Start checks the environment's values (an error stops the platform, as a bad variable always has) and makes them the current ones. |
(*Holder) Run |
method | Run reads the saved values now and every 15 seconds until ctx ends. |
(*Holder) Refresh |
method | Refresh reads the saved values and follows them; when the database cannot be read, the last values stay. |
(*Holder) apply |
method | |
(*Holder) Boundary |
method | Boundary is the boundary and quota now. |
(*Holder) Network |
method | Network is the network boundary now, for the controller's render. |
(*Holder) Effective |
method | Effective are the values in force now. |
(*Holder) SavedValues |
method | SavedValues are the values saved on the page, by variable. |
(*Holder) Invalid |
method | Invalid is why the saved values are set aside ("" when they are not). |
copyValues |
func | |
sameNetwork |
func |
internal/ajustes/ajustes_test.go¶
105 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestRead |
func | |
TestHolderSavedWins |
func | |
TestHolderRefusesABadEnvironment |
func |
internal/ajustes/ia_test.go¶
25 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestLocalModelSettings |
func | The local model's address must be an http(s) address, and its model a name without spaces. |
internal/analytics¶
Package analytics reads visitor statistics from Umami, so each app's page shows who visits it without leaving rendimiento.
internal/analytics/umami.go¶
592 lines
| Name | Kind | Summary |
|---|---|---|
Umami |
struct | Umami is a client for the Umami API (v2 and v3), signed in as one user. |
Website |
struct | Website is a site Umami counts visits for. |
Stats |
struct | Stats are the totals of a period. |
Point |
struct | Point is one bucket of a series: its start and its count. |
Metric |
struct | Metric is one row of a top list (a path, a referrer, a country code). |
Report |
struct | Report is everything the Visits tab shows for one website. |
Session |
struct | Session is one anonymous visitor in a period: where from, on what, and how much they looked. |
Step |
struct | Step is one thing a visitor did: a page they saw, or an event. |
(*Umami) client |
method | client is the HTTP client (20 seconds at most per request by default). |
(*Umami) login |
method | login signs in to Umami with its user and password and returns the token for later requests. |
(*Umami) SetLogin |
method | SetLogin makes the client sign in with another user from now on (a user changed on the Environment page), with no restart. |
(*Umami) SignIn |
method | SignIn signs in now: ErrAuth when Umami refuses the user name or password. |
(*Umami) get |
method | get calls a read-only endpoint, signing in first and again when the token has expired. |
remember |
func | remember returns key's kept answer, or reads it with f (see cacheFor). |
page |
struct | |
(*Umami) Websites |
method | Websites lists the sites the user can see: its own and its teams'. |
num |
type | num reads a JSON number that may come as a string (bigint columns) or null. |
(*num) UnmarshalJSON |
method | UnmarshalJSON accepts Umami's numbers whether they come as numbers, strings or null. |
rawStats |
struct | |
(rawStats) stats |
method | stats converts Umami's numbers to Stats. |
xy |
struct | |
Period |
struct | Period is the window a report covers, bucketed by hour or by day. |
(*Umami) Report |
method | Report gathers a website's numbers for the period, in parallel. |
reportKey |
func | reportKey names a report in the cache. |
rawSession |
struct | |
(rawSession) session |
method | session converts Umami's row to a Session. |
parseTime |
func | parseTime reads Umami's timestamps, which come as RFC 3339 or as "2026-10-06 13:00:00.123" in UTC, depending on the database. |
(*Umami) Activity |
method | Activity is what one visitor did between from and to, oldest first: the pages they saw and the events they caused (at most Umami's 500). |
(*Umami) Totals |
method | Totals are a website's numbers for a period and for the one before it: the dashboard's summary, one call per site. |
series |
func | series turns Umami's sparse buckets into one point per hour or day of the period, zeros included, so a chart has no holes. |
truncate |
func | truncate is the start of t's day or hour in the period's time zone. |
next |
func | next is the day or hour after t. |
parseBucket |
func | parseBucket reads "2026-10-06 13:00:00" (local to the time zone asked for) or "2026-10-06T13:00:00Z" (UTC). |
Host |
func | Host normalizes a website domain or an app host for matching: lower case, no scheme, port, path or leading "www.". |
Match |
func | Match returns the websites whose domain is one of hosts. |
internal/analytics/umami_test.go¶
221 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestUmamiReport |
func | |
TestHost |
func | |
TestReportKey |
func | A period that ends now keeps its cache key as the clock moves ("today" grows, "the last 7 days" slides), and periods of other lengths differ. |
internal/api¶
Package api serves the REST + SSE API, GitHub webhooks, login, one-click GitHub App setup, and the embedded web UI.
internal/api/acceso.go¶
319 lines
| Name | Kind | Summary |
|---|---|---|
accessKey |
struct | |
accessOf |
func | accessOf is what the signed-in person may do on their organization's apps (set by requireRole; without it, no app is theirs). |
(*Server) routeApp |
method | routeApp is the app a request is about, from its path: {app}, a run's ({id} under /api/runs/), or an encargo's ({id} under /api/encargos/, when it names an app). |
(*Server) platformHidden |
method | platformHidden are the platform organization's apps login may not see, for the platform's pages (Problems, Mercado, add-ons): those are the operators' view of the whole installation, and there an app's list leaves out the operators it leaves out. |
(*Server) hiddenApps |
method | hiddenApps are the apps of the whole installation the person may not see (other organizations' and those whose list leaves them out), for what mixes every app (the cluster's catalog, traces). |
visibleUniverse |
func | visibleUniverse leaves out of the Universe's inputs what belongs to apps the person may not see: their workloads in the cluster's catalog and their traced calls. |
bitacoraApp |
func | bitacoraApp is the app a bitácora row is about, as far as it says: the app in its path, in its detail, or in an agent's arguments. |
argsApp |
func | argsApp is the app an agent's tool call names in its arguments (JSON), or "". |
rutaAboutHidden |
func | rutaAboutHidden says whether a Ruta entry is about (or tagged with) an app the person may not see (a known failure of it, say): the Ruta is the organization's, but what it says of an app is that app's. |
AppAccessView |
struct | AppAccessView is the app page's «Who enters» section: whether the app has a list, who is on it, and the organization's people (who can be added; administrators always enter). |
orgAdminOnly |
func | orgAdminOnly answers 403 unless the person is an administrator of the organization: an app's administrator does not choose who enters it. |
(*Server) appAccessView |
method | appAccessView answers the app's list as the section shows it. |
(*Server) getAppMembers |
method | getAppMembers is who enters the app. |
(*Server) putAppList |
method | putAppList turns the app's list on ({"list": true}: only the organization's administrators enter until people are added) or off (everyone of the organization enters with their role). |
(*Server) putAppMember |
method | putAppMember gives a person of the organization a role on the app ({"role": "guest"|"collaborator"|"admin"}), turning its list on. |
(*Server) deleteAppMember |
method | deleteAppMember takes a person off the app's list: they no longer see it. |
internal/api/actividad.go¶
65 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) activityStream |
method | activityStream sends the organization's activity as server-sent events (event: activity) while the page is open: runs that start and end, releases, encargos that move. |
internal/api/addons.go¶
266 lines
| Name | Kind | Summary |
|---|---|---|
addonView |
struct | addonView is an add-on as the UI shows it. |
addonApp |
struct | |
(*Server) renovateView |
method | renovateView is the Renovate add-on as its page shows it: on or off, its settings (or the defaults), its last run and when the next one is. |
(*Server) listAddons |
method | listAddons is the built-in add-ons (Renovate). |
(*Server) getAddon |
method | getAddon is one built-in add-on's page. |
(*Server) putAddon |
method | putAddon switches a built-in add-on on or off and saves its settings. |
(*Server) startAddonRun |
method | startAddonRun runs the add-on now ("Run now"), unless a run is going. |
(*Server) listAddonRuns |
method | listAddonRuns is the add-on's last 30 runs. |
(*Server) getAddonRun |
method | getAddonRun is one run of an add-on, with what it did per repository. |
(*Server) appAddons |
method | appAddons is the app page's view: its switch and what the last run did. |
(*Server) putAppAddon |
method | putAppAddon switches Renovate on or off for one app. |
internal/api/ajustes.go¶
374 lines
| Name | Kind | Summary |
|---|---|---|
SettingView |
struct | SettingView is one live setting on the Environment page: the value in force, the environment's (the ConfigMap's), and the saved one that wins over it. |
FixedSetting |
struct | FixedSetting is a setting the page shows but does not change: the platform needs it to start, or it changes what already exists. |
SettingsView |
struct | SettingsView is every setting the Environment page shows. |
fueraCache |
struct | fueraCache keeps the apps the boundary leaves out (one key: all apps). |
(*Server) fueraDeTodas |
method | fueraDeTodas is which of the platform's apps the boundary leaves out, from the cache: ErrSlow while a first look is still going on. |
(*Server) settingsView |
method | |
(*Server) getSettings |
method | getSettings is every setting, live and fixed, with where its value comes from. |
(*Server) putSetting |
method | putSetting saves a live setting: it wins over the environment's value in every process within 15 seconds, this one at once. |
(*Server) deleteSetting |
method | deleteSetting forgets a saved setting: the environment's value holds again. |
(*Server) liveSetting |
method | liveSetting finds a live setting that can be changed in this process. |
(*Server) missingNamespaces |
method | missingNamespaces is the first namespace the changed setting names that the cluster does not have ("" when they all exist, or with no cluster). |
BoundaryCaller |
struct | BoundaryCaller is a namespace whose workloads call apps across the boundary: with it on, they are stopped unless it is let in. |
BoundaryCheck |
struct | BoundaryCheck is what the page shows before the boundary is turned on. |
(*Server) boundaryCheck |
method | boundaryCheck lists the likely callers of apps from outside their organization: workloads whose environment points at an app's service (the services catalog). |
(*Server) boundaryCallers |
method | boundaryCallers are the namespaces whose workloads point at the apps' services from outside each app's organization (only those of org, when it is not 0), from the services catalog: fresco.ErrSlow while a first catalog is still being read. |
internal/api/arreglos.go¶
346 lines
| Name | Kind | Summary |
|---|---|---|
fixOffer |
struct | fixOffer is what a failed run's page offers when a step's log says a lockfile is stale: the declared fix that regenerates it, or, when the app declares none, the recipe to add to rendimiento.yaml. |
(*Server) fixRunApp |
method | fixRunApp is a run's fix runs with the run and its app, after the access checks; false means the answer was written. |
(*Server) offer |
method | offer reads every failed step's log for a stale lockfile, and finds the declared fix (from the default branch) that covers one of those steps' folders; without one, the recipe to declare for the deepest folder. |
fixName |
func | fixName is a name for a fix to declare: its recipe and folder (npm-web), not taken by anything else of the app. |
(*Server) getRunFix |
method | getRunFix is what a failed run's page offers to regenerate a stale lockfile, and the fixes already run for it. |
(*Server) runFix |
method | runFix runs the declared fix the offer names on the run's branch, and commits what it writes there with the person as a co-author: the branch's new run tests it. |
(*Server) addFix |
method | addFix opens a branch from the default one that declares the recipe the offer proposes in rendimiento.yaml, on the app's forja; the person opens its pull request (merge request on GitLab) and merges it. |
addFixYAML |
func | addFixYAML adds a fix to rendimiento.yaml as text, so its comments and order stay: at the end of its fixes: list, or as a new one at the end. |
(*Server) fixRunLog |
method | fixRunLog is the whole log of one of a run's fixes. |
internal/api/barda.go¶
228 lines
| Name | Kind | Summary |
|---|---|---|
Barda |
struct | Barda is the boundary between organizations as one organization's apps see it: whether it is on, who is let in (the ingress, rendimiento, the listed namespaces and ranges), which apps it leaves out and why, the ports open to the LAN, and who calls in from outside. |
(*Server) barda |
method | barda works out the boundary for an organization's apps (nil when there is no cluster or no settings: nothing to draw). |
fuera |
struct | fuera is which apps the boundary leaves out (app -> OutsideShared or OutsideNode) and, for OutsideNode, the nodes behind it. |
(*Server) fueraDeLaBarda |
method | fueraDeLaBarda works out which of apps the boundary leaves out: a shared namespace, or a pod on a node that does not enforce network policies. |
AppBarda |
struct | AppBarda is one app's place in the boundary, for its page. |
(*Server) appBarda |
method | appBarda is the boundary as one app sees it (204 with no cluster). |
callersOf |
func | callersOf keeps the calls into the given apps, and the callers left with any: a person sees nothing of an app they cannot see. |
internal/api/bitacora.go¶
227 lines
| Name | Kind | Summary |
|---|---|---|
detalleKey |
struct | detalleKey carries, in a request's context, what its handler adds to its bitácora row (anotarDetalle). |
anotarDetalle |
func | anotarDetalle adds what a route did to its bitácora row, beyond what its path says: a decision, what it was about. |
(*Server) anotando |
method | anotando records every call of a route that changes something (all but GET) in the bitácora: who (the person signed in), the route, what it was on (its path values: the app, the run, the secret's name, never a value) and how it ended (the HTTP status). |
(*Server) anotar |
method | anotar writes to the bitácora even when the request was cancelled; a failure is logged, never shown to the person (their action is done). |
statusWriter |
struct | statusWriter remembers the status a handler answered with. |
(*statusWriter) WriteHeader |
method | |
(*statusWriter) Write |
method | |
(*statusWriter) Flush |
method | Flush lets a streaming answer through. |
(*statusWriter) Unwrap |
method | Unwrap gives http.ResponseController the writer underneath. |
(*Server) listBitacora |
method | listBitacora is the organization's bitácora, newest first, filtered by ?quien=, ?accion=, ?app= and paged with ?antes= (an id). |
(*Server) verifyBitacora |
method | verifyBitacora walks the organization's chain and says whether it holds. |
(*Server) listAprobaciones |
method | listAprobaciones is the organization's requests from agents: those still waiting with ?pendientes=1, else the last 50. |
(*Server) traducirMotivo |
method | traducirMotivo puts a request's reason in the reader's language (?lang=, es or en): kept from an earlier reader, or translated now by the AI and kept. |
(*Server) decidirAprobacion |
method | decidirAprobacion is an administrator approving or rejecting an agent's request ({"aprobar": true, "comentario": "…"}); approved, it is done at once in their name. |
internal/api/bitbucket.go¶
488 lines
| Name | Kind | Summary |
|---|---|---|
BitbucketStore |
struct | BitbucketStore adapts the store's connections to the bitbucket package. |
(BitbucketStore) BitbucketConnection |
method | BitbucketConnection is one connection, bitbucket.ErrNotConnected when none. |
(BitbucketStore) BitbucketConnections |
method | BitbucketConnections lists every connection. |
(BitbucketStore) LockToken |
method | LockToken holds the connection's token refresh for this process alone (see store.LockToken). |
toBitbucket |
func | |
BitbucketSecrets |
struct | BitbucketSecrets keeps each Bitbucket connection's secret in a Kubernetes Secret of its own (rendimiento-bitbucket- |
bitbucketSecretName |
func | |
(BitbucketSecrets) Load |
method | Load is the connection's secret, nil when it has none. |
(BitbucketSecrets) Save |
method | Save creates or replaces it. |
bitbucketView |
struct | bitbucketView is a workspace on the Environment page. |
(*Server) bitbucketViews |
method | bitbucketViews lists the workspaces for listForjas; counts are the apps of each connection, by forja and id. |
(*Server) bitbucketReady |
method | bitbucketReady answers 503 when this platform has no Bitbucket forja. |
(*Server) sendToBitbucket |
method | sendToBitbucket sets the state cookie and answers where the browser goes. |
(*Server) connectBitbucket |
method | connectBitbucket is POST /api/forjas/bitbucket: an administrator gives a workspace and its OAuth consumer (key and secret); it is kept, and the answer says where to authorize it. |
(*Server) keepBitbucket |
method | keepBitbucket reads a workspace and its OAuth consumer from the request and keeps them, the secret in the connection's Secret; by is who connected it. |
(*Server) bitbucketConnection |
method | bitbucketConnection is the connection {id} of the URL; nil means the answer was already written. |
(*Server) reauthorizeBitbucket |
method | reauthorizeBitbucket is POST /api/forjas/bitbucket/{id}/authorize. |
(*Server) deleteBitbucket |
method | deleteBitbucket is DELETE /api/forjas/bitbucket/{id}: forget a connection no app uses. |
(*Server) bitbucketLogin |
method | bitbucketLogin is GET /api/auth/bitbucket/{id}: "Sign in with Bitbucket". |
(*Server) linkBitbucket |
method | linkBitbucket is POST /api/me/identities/bitbucket/{id}: the person links their Bitbucket account to themselves. |
(*Server) bitbucketCallback |
method | bitbucketCallback is where Bitbucket sends people back (the consumer's callback URL), as gitlabCallback does for GitLab. |
bitbucketSays |
func | bitbucketSays is Bitbucket's own sentence for refusing, when it gave one. |
(*Server) bitbucketWebhook |
method | bitbucketWebhook receives the workspaces' events: a delivery no connection's secret signed is refused. |
(*Server) bitbucketRepos |
method | bitbucketRepos is GET /api/forjas/bitbucket/{id}/repos: the repositories the New app wizard offers from that workspace. |
(*Server) bitbucketAllowed |
method | bitbucketAllowed answers 403 where the organization may not use the platform's Bitbucket connections (any other than the platform's, for now). |
(*Server) bitbucketRepoAllowed |
method | bitbucketRepoAllowed checks a Bitbucket app's connection and repository before proposing or creating it; false means the answer was written. |
internal/api/capacidad.go¶
88 lines
| Name | Kind | Summary |
|---|---|---|
CapacityView |
struct | CapacityView is the capacity set on the Environment page, with what each value is when it is not set (the environment variables). |
(*Server) capacityView |
method | |
(*Server) getCapacity |
method | getCapacity is the capacity set on the Environment page. |
(*Server) putCapacity |
method | putCapacity sets how much the platform runs at once: every process follows it within 15 seconds, this one at once. |
internal/api/cola.go¶
284 lines
| Name | Kind | Summary |
|---|---|---|
Portada |
struct | Portada is what the Ruta's front page shows: one row for each thing that needs the person, and the counts of what goes on by itself meanwhile. |
(*Server) portada |
method | portada answers the Ruta's front page for the person. |
lower |
func | |
Cola |
struct | Cola is the coding agent's queue: what it does now, what it does next in order, what it finished for the person to review, and what it gave back to them; how it works (its mode, how many at once) and what it spent today, against the organization's monthly cap. |
(*Server) cola |
method | cola answers the coding agent's queue (?hoy= as for portada). |
(*Server) reorderCola |
method | reorderCola puts the coding agent's queue in the order the person gave: the ids of the encargos, the first done first. |
(*Server) mayActOn |
method | mayActOn says whether the person is a collaborator on an app (or the encargo has none). |
(*Server) setEncargoApp |
method | setEncargoApp says which app a pending encargo is about, when it was asked without one (or the wrong one), before anyone takes it. |
(*Server) stopEncargo |
method | stopEncargo asks the platform's coding agent to stop the encargo it does: it gives it back to the person with what it did. |
internal/api/comentarios.go¶
126 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) listComentarios |
method | listComentarios is the thread of a cargo (?cargo=) or an encargo (?encargo=), or with neither the organization's latest comments, oldest first. |
visibleComentarios |
func | visibleComentarios leaves out the comments about apps the person may not see. |
idParam |
func | idParam reads an optional number from the query (0 when absent). |
(*Server) addComentario |
method | addComentario is a person's comment on an agent's cargo or on an encargo: it does not send anything back, and agents find it when they start. |
(*Server) respuestasSinVer |
method | respuestasSinVer are agents' answers to the person's comments that they have not seen yet: the bell shows them. |
(*Server) verRespuestas |
method | verRespuestas notes that the person saw these answers to their comments (the thread they are in was on their screen). |
internal/api/corriendo.go¶
60 lines
| Name | Kind | Summary |
|---|---|---|
RunNow |
struct | RunNow is a run as the Apps page's "Running now" and the top bar's search show it: the app's name, and the run (with its steps while it goes on). |
Corriendo |
struct | Corriendo is what goes on in the person's organization: the runs queued or running, with their steps, and the last ones that ended. |
(*Server) corriendo |
method | corriendo answers what goes on in the apps whose list lets the person in: one small read the Apps page repeats while it is open, and the search in the top bar reads for its runs. |
internal/api/credentials.go¶
57 lines
| Name | Kind | Summary |
|---|---|---|
SecretCredentials |
struct | SecretCredentials stores the GitHub App credentials in a Kubernetes Secret. |
(*SecretCredentials) Load |
method | Load returns the GitHub App's credentials, or nil before setup has run. |
(*SecretCredentials) Save |
method | Save stores the GitHub App's credentials (created or replaced). |
internal/api/delivery.go¶
90 lines
| Name | Kind | Summary |
|---|---|---|
DeliveryReport |
struct | DeliveryReport is the dashboard's delivery health: the last 30 days, the 30 before them, and twelve weeks of history. |
deliveryCache |
struct | deliveryCache keeps delivery reports by time zone. |
(*Server) delivery |
method | delivery is the dashboard's delivery health: deploys, builds and their times, verifications, rollbacks and outages of the last 30 days next to the 30 before, and twelve weeks of history. |
(*Server) deliveryReport |
method | deliveryReport reads the delivery report's three parts at once. |
internal/api/demo.go¶
121 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) openDemo |
method | openDemo is a demo link: GET /demo/{code} signs the browser in as the link's guest, read-only in its organization, and goes to the apps. |
CreatedDemoLink |
struct | CreatedDemoLink is a new demo link with its address, shown only once. |
(*Server) listDemoLinks |
method | listDemoLinks lists the organization's demo links (never their codes). |
(*Server) createDemoLink |
method | createDemoLink makes a demo link for the organization, for 1 to 90 days. |
(*Server) deleteDemoLink |
method | deleteDemoLink turns a demo link off; whoever opened it loses access at once. |
internal/api/diagnosis.go¶
216 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) getDiagnosis |
method | getDiagnosis is a failed run's diagnosis by the diagnostician agent: why it failed and how to fix it (404 when there is none yet). |
(*Server) translateDiagnosis |
method | translateDiagnosis puts d in the language want: from its kept translations, or translated now (and kept). |
(*Server) askDiagnosis |
method | askDiagnosis asks the diagnostician agent to explain a failed run (again). |
DiagnosisFeedback |
struct | DiagnosisFeedback is what a person says of a diagnosis: it helped, or it was wrong and the real cause was Cause. |
(*Server) diagnosisFeedback |
method | diagnosisFeedback keeps what a person says of a diagnosis, and turns it into a known failure in the Ruta (tagged falla-conocida and the app), which the diagnostician reads when a similar failure comes: that is how it learns. |
knownFailure |
func | knownFailure is the Ruta entry a judged diagnosis becomes, in the Ruta's language (Mexican Spanish): the telling line, and the cause that was confirmed or corrected. |
internal/api/dormir.go¶
157 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) conSueno |
method | conSueno answers 409 where rendimiento cannot sleep (a cluster); false means the answer was written. |
(*Server) getDormir |
method | getDormir is GET /api/dormir: where the sleep stands, with the publishes it would wait for and the webhooks waiting for the wake. |
(*Server) postDormir |
method | postDormir is POST /api/dormir {ya, apagar}: sleep once the publish going on ends (ya: now, cutting it), and with apagar stop rendimiento too. |
(*Server) postDespertar |
method | postDespertar is POST /api/despertar: wake now. |
(*Server) putDormirOpciones |
method | putDormirOpciones is PUT /api/dormir/opciones {despertarA, tapa}: the hour to wake at by itself ("" off) and «Dormir al cerrar la tapa». |
(*Server) respuestaSueno |
method | |
(*Server) AtenderAvisos |
method | AtenderAvisos handles the webhooks kept while rendimiento slept, in the order they came, as if they arrived now (platform.Sueno.Avisos). |
(*Server) forjaLlamada |
method | forjaLlamada is the forja by its name ("github", "gitlab", "bitbucket"), or nil when it is not here. |
internal/api/encargos.go¶
272 lines
| Name | Kind | Summary |
|---|---|---|
NewEncargo |
struct | NewEncargo asks agents for something: what, the detail, and the app or run it is about. |
(*Server) listEncargos |
method | listEncargos lists the open encargos (?all=1: also reviewed and cancelled). |
(*Server) createEncargo |
method | createEncargo leaves work for agents, pending until one takes it. |
(*Server) encargoID |
method | encargoID reads {id} of an encargo of the person's organization, or answers 400 or 404. |
(*Server) getEncargo |
method | getEncargo is one encargo with its history. |
(*Server) reviewEncargo |
method | reviewEncargo is the person's answer to a delivered encargo: accepted, or sent back with a comment for the next agent. |
(*Server) routeEncargo |
method | routeEncargo is who does a pending encargo: the platform's AI, or the person's own agent. |
(*Server) doEncargos |
method | doEncargos sends pending encargos to the platform's coding agent. |
(*Server) reestimateEncargo |
method | reestimateEncargo asks the estimator to rate an encargo again. |
(*Server) cancelEncargo |
method | cancelEncargo cancels an encargo that is not finished, with why when the person says it ({"reason": ...}, optional). |
(*Server) encargoAnswer |
method |
internal/api/fallas.go¶
203 lines
| Name | Kind | Summary |
|---|---|---|
FallaUI |
struct | FallaUI is what the UI reports when it shows one of its error pages (web/src/components/falla.tsx): which one, on what page, from which page the person came, and the UI's version; for a page that failed drawing, the error and the top of its component stack. |
rutaValida |
func | rutaValida: a path of this site, as a browser's location.pathname gives it (percent-encoded): starts with one "/", no spaces or control characters, no query, bounded. |
texto |
func | texto keeps text from a browser printable: control characters become spaces (newlines kept when lineas), then it is cut to n characters. |
ritmoFallas |
struct | ritmoFallas counts reports per session, in fixed windows. |
ventanaFallas |
struct | |
(*ritmoFallas) deja |
method | deja reports whether the session may report one more now. |
(*Server) recibirFalla |
method | recibirFalla records an error page the UI showed (POST /api/fallas) on the Problems page: grouped by kind and path, with where the person came from. |
internal/api/forjas.go¶
587 lines
| Name | Kind | Summary |
|---|---|---|
GitLabStore |
struct | GitLabStore adapts the store's connections to the gitlab package. |
(GitLabStore) GitLabConnection |
method | GitLabConnection is one connection, gitlab.ErrNotConnected when none. |
(GitLabStore) GitLabConnections |
method | GitLabConnections lists every connection. |
(GitLabStore) LockToken |
method | LockToken holds the connection's token refresh for this process alone (see store.LockToken). |
toGitLab |
func | |
GitLabSecrets |
struct | GitLabSecrets keeps each GitLab connection's secret in a Kubernetes Secret of its own (rendimiento-gitlab- |
gitlabSecretName |
func | |
(GitLabSecrets) Load |
method | Load is the connection's secret, nil when it has none. |
(GitLabSecrets) Save |
method | Save creates or replaces it. |
forjaView |
struct | forjaView is the Environment page's «Where your code lives». |
gitlabView |
struct | |
(*Server) listForjas |
method | listForjas is GET /api/forjas: the forjas connected here. |
(*Server) gitlabReady |
method | gitlabReady answers 503 when this platform has no GitLab forja. |
(*Server) sendToGitLab |
method | toGitLab sets the state cookie and answers where the browser goes. |
(*Server) connectGitLab |
method | connectGitLab is POST /api/forjas/gitlab: an administrator gives a GitLab's address and their OAuth application (id and secret); it is kept, and the answer says where to authorize it. |
(*Server) keepGitLab |
method | keepGitLab reads a GitLab's address and OAuth application from the request and keeps them, the secret in the connection's Secret; by is who connected it. |
(*Server) gitlabConnection |
method | gitlabConnection is the connection {id} of the URL; nil means the answer was already written. |
(*Server) reauthorizeGitLab |
method | reauthorizeGitLab is POST /api/forjas/gitlab/{id}/authorize: authorize the connection again (another person, or a token GitLab revoked). |
(*Server) deleteGitLab |
method | deleteGitLab is DELETE /api/forjas/gitlab/{id}: forget a connection no app uses. |
(*Server) gitlabLogin |
method | gitlabLogin is GET /api/auth/gitlab/{id}: "Sign in with GitLab". |
(*Server) linkGitLab |
method | linkGitLab is POST /api/me/identities/gitlab/{id}: the person links their account on that GitLab to themselves; the answer says where to authorize it. |
(*Server) myIdentities |
method | myIdentities is GET /api/me/identities: the person's linked accounts, and the GitLabs and Bitbucket workspaces they could link one of (and whether GitHub is connected: Members offers the forjas people sign in with). |
(*Server) unlinkIdentity |
method | unlinkIdentity is DELETE /api/me/identities: one of the person's own accounts is no longer them (?forja, ?baseUrl, ?externalId). |
(*Server) gitlabCallback |
method | gitlabCallback is where GitLab sends people back: the state is checked against the cookie, the code traded for the account, and then what they went for is done. |
gitlabSays |
func | gitlabSays is GitLab's own sentence for refusing, when it gave one. |
(*Server) sessionLogin |
method | sessionLogin is who the request's session belongs to. |
(*Server) gitlabProjects |
method | gitlabProjects is GET /api/forjas/gitlab/{id}/projects: the projects the New app wizard offers from that GitLab. |
(*Server) gitlabAllowed |
method | gitlabAllowed answers 403 where the organization may not use GitLab connections (any other than the platform's, for now). |
(*Server) gitlabRepoAllowed |
method | gitlabRepoAllowed checks a GitLab app's connection and repository before proposing or creating it; false means the answer was written. |
internal/api/i18n.go¶
91 lines
| Name | Kind | Summary |
|---|---|---|
localized |
func | localized translates the JSON answers of /api/ for a browser that asks for Spanish (Accept-Language). |
translateJSON |
func | translateJSON walks a decoded JSON value; key is the object key the value sits under (array elements inherit it, so "details": [...] translates). |
bufferedWriter |
struct | bufferedWriter holds a handler's answer so it can be translated. |
(*bufferedWriter) Header |
method | Header, WriteHeader and Write keep the answer, to translate it before it is sent. |
(*bufferedWriter) WriteHeader |
method | |
(*bufferedWriter) Write |
method |
internal/api/ia.go¶
572 lines
| Name | Kind | Summary |
|---|---|---|
IAKeys |
interface | IAKeys stores organizations' own AI keys (ia.SecretKeys). |
IAView |
struct | IAView is the organization's AI page. |
CoderBoleta |
struct | CoderBoleta is the coding agent's record: the encargos it took, how many it delivered at the first try, a person sent back, and it gave back; what it spent against what was estimated; and what the estimator learned. |
(*Server) coderBoleta |
method | coderBoleta reads the coding agent's record, and what it teaches the estimator, priced as the estimator prices it. |
(*Server) iaView |
method | iaView is the organization's AI settings, spending and latest calls. |
IAInput |
struct | IAInput is what an organization's administrator chooses. |
micros |
func | micros turns dollars into millionths of a dollar. |
(*Server) putIA |
method | putIA saves the organization's AI choices and, if given, its own key. |
(*Server) testIA |
method | testIA asks the organization's model one question, to try the settings (measured like any call). |
IAOrg |
struct | IAOrg is one organization on the operator's AI page. |
(*Server) iaOrgs |
method | iaOrgs is the operator's view: every organization's allowance of the platform's AI and what it spent of it this month, and the platform's bill. |
(*Server) putIAAllowance |
method | putIAAllowance is what the operator lets an organization spend of the platform's AI each month. |
autoEncargoMode |
func | autoEncargoMode says whether mode is one an organization (or, with empty allowed, an app following it) may choose. |
(*Server) putAppAutoEncargo |
method | putAppAutoEncargo is an app's own choice of when an encargo opens for its failures ("" follows the organization's AI page). |
(*Server) putAppAutoMerge |
method | putAppAutoMerge is whether rendimiento merges the app's open pull requests once their branch passes its run: the ones a person approved in rendimiento, or any. |
LocalProbe |
struct | LocalProbe is what an Ollama said when asked before connecting it. |
(*Server) probeLocal |
method | probeLocal asks an Ollama which models it holds, so the AI page can say whether it answers before its address is saved (AI_LOCAL_URL). |
LocalModelView |
struct | LocalModelView is the local model as the AI page shows it to the platform's administrators: its address and model now, and whether they were saved there (or come from the environment). |
(*Server) localModelView |
method | |
(*Server) getLocalModel |
method | getLocalModel is the local model the gateway uses now. |
(*Server) putLocalModel |
method | putLocalModel connects the local model (an empty address disconnects it): saved as the live settings AI_LOCAL_URL and AI_LOCAL_MODEL, it wins over the environment's in every process within 15 seconds, this one at once. |
internal/api/ia_cuentas.go¶
63 lines
| Name | Kind | Summary |
|---|---|---|
CuentasView |
struct | CuentasView is «How the coding agent is doing» on the AI page: what it did over the last Days days (0: all of it, store.CoderCuentas), and the factor the estimator applies today, learned from its record: the very numbers of its record (CoderBoleta.Learned), not computed again. |
(*Server) iaCuentas |
method | iaCuentas is how the organization's coding agent is doing, over the last 30 days (?days=: 7, 30, 90, or 0 for all of it), for every member who sees the AI page. |
internal/api/inicio.go¶
176 lines
| Name | Kind | Summary |
|---|---|---|
InicioView |
struct | InicioView is the signed-in person's home page: its sections in order, whether they chose it (Propias) or it is the default, the default itself, and whether they may set the default for everyone. |
completar |
func | completar keeps the known sections of in, once each and in its order, and adds the ones it lacks as base has them: a section added in a later version shows up where it was never chosen. |
validas |
func | validas says whether a list sent is made of known sections, each once. |
(*Server) verInicio |
method | verInicio is the person's home page (GET /api/inicio, any role). |
leerSecciones |
func | leerSecciones reads {"secciones": [...]} and checks it; false when it answered already. |
(*Server) putInicio |
method | putInicio keeps the person's own home page (PUT /api/inicio, any role: a guest lays out their own view too). |
(*Server) borrarInicio |
method | borrarInicio is "Back to the usual": the person's own layout is forgotten, and the default shows again (DELETE /api/inicio). |
(*Server) putInicioPredeterminado |
method | putInicioPredeterminado sets the home page of everyone who never chose theirs (PUT /api/inicio/predeterminado, the platform's administrators). |
(*Server) borrarInicioPredeterminado |
method | borrarInicioPredeterminado goes back to the built-in default (DELETE /api/inicio/predeterminado, the platform's administrators). |
internal/api/instalaciones.go¶
254 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) platformWide |
method | platformWide reports whether the person, where they work now, uses every installation: in the platform's organization, or as one of its operators. |
(*Server) usable |
method | usable lists the installations the organization may create apps from. |
(*Server) connectable |
method | connectable lists the installations the person could connect to their organization themselves: the App on their own GitHub account, not yet connected here. |
(*Server) connectInstallation |
method | connectInstallation gives the person's organization the App installed on their own GitHub account (its login is the one they signed in with). |
(*Server) disconnectInstallation |
method | disconnectInstallation stops the organization creating apps from an installation; its apps keep building from it. |
(*Server) orgInstallations |
method | orgInstallations is, for the operators, every installation of the App, the organizations each is given to, and the organizations to give them to. |
(*Server) orgAndInstallation |
method | orgAndInstallation reads an operator's request about installation {id} and an organization (other than the platform's); ok false means the answer was already written. |
(*Server) giveInstallation |
method | giveInstallation lets an organization create apps from an installation (an operator's decision, for a GitHub organization's account). |
(*Server) takeInstallation |
method | takeInstallation takes an installation away from an organization (?org=); its apps keep building from it. |
internal/api/instalar.go¶
423 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) installMAC |
method | |
(*Server) openInstall |
method | openInstall starts an install session and answers its nonce. |
(*Server) installSession |
method | installSession is the request's install session's nonce, if it has a good one. |
(*Server) closeInstall |
method | |
(*Server) installed |
method | installed says whether the platform is installed: the setup page finished here, or (a platform installed before it kept that) it has an administrator and a forja to sign in with. |
(*Server) setupToken |
method | setupToken is POST /api/setup/token: step 1. |
(*Server) installGate |
method | installGate lets a step of the setup page through: the platform is not installed yet and the request has an install session. |
(*Server) setupGitLab |
method | setupGitLab is POST /api/setup/gitlab: step 2 with a GitLab. |
(*Server) setupBitbucket |
method | setupBitbucket is POST /api/setup/bitbucket: step 2 with a Bitbucket workspace. |
(*Server) finishInstall |
method | finishInstall is the forja's answer to step 2: the state cookie carried the install session's nonce, which must still be this browser's. |
(*Server) claimInstall |
method | claimInstall makes login the first administrator, marks the platform installed, ends the install session and signs them in. |
(*Server) installView |
method | installView is the setup page's state, in the setup status while the platform is not installed: whether this browser has an install session, which forjas this platform can connect, what is connected already, and the addresses an OAuth application needs. |
claveGitLab |
func | claveGitLab is the key of the GitLab at baseURL: its host, as gitlab.Login names its accounts ([email protected]). |
claveDeLogin |
func | claveDeLogin is the forja a member's own name signs in with: ana is GitHub's, [email protected] Bitbucket's, [email protected] (any other host) a GitLab's. |
claveDeIdentidad |
func | claveDeIdentidad is the forja a linked account signs in with. |
pierdenAcceso |
func | pierdenAcceso are the people who sign in with a forja in antes and none in despues (everyone, and the administrators among them): who loses access when a forja goes. |
(*Server) forjasDeEntrada |
method | forjasDeEntrada are the forjas one signs in with here, leaving out the connection sin ("gitlab/ |
(*Server) quienesPierden |
method | quienesPierden are who would lose access if the connection sin went. |
(*Server) lastForjaOfAnAdmin |
method | lastForjaOfAnAdmin answers 409 when taking the connection sin away would leave an administrator with no forja to sign in with (decision 2); false means the answer was written. |
(*Server) forjaAcceso |
method | forjaAcceso is GET /api/forjas/{gitlab|bitbucket}/{id}/acceso: who would lose access if the connection went, for the warning before removing it. |
ForjasConectadas |
func | ForjasConectadas lists, for the environment check, the GitLabs and Bitbucket workspaces connected and authorized here. |
internal/api/installed.go¶
353 lines
| Name | Kind | Summary |
|---|---|---|
installedView |
struct | installedView summarizes an installed add-on. |
view |
func | view is an installed add-on as the UI shows it (with its full definition when full). |
(*Server) addonCatalog |
method | addonCatalog is the add-ons that can be installed in one click. |
(*Server) listInstalled |
method | listInstalled is every installed add-on (Addon objects in the cluster). |
(*Server) getInstalled |
method | getInstalled is one installed add-on with its definition. |
owner |
func | owner is the account part of owner/repo. |
(*Server) putInstalled |
method | putInstalled installs or changes an add-on by committing its definition to the gitops repository; the sync then applies it. |
(*Server) commitDefinition |
method | commitDefinition writes an add-on's definition to the gitops repository, where add-ons are kept (ADDONS_REPO), and returns the commit. |
(*Server) gitopsClient |
method | gitopsClient is a GitHub client for the gitops repository and its default branch. |
(*Server) syncInstalled |
method | syncInstalled asks a manual-sync add-on to apply its pending changes. |
(*Server) deleteInstalled |
method | deleteInstalled removes the definition from git. |
deepMerge |
func | deepMerge copies src into dst, merging nested maps. |
(*Server) patchInstalled |
method | patchInstalled flips switches in an add-on's definition (suspend, allow adoption changes) and commits it. |
internal/api/libreta.go¶
108 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) appLibreta |
method | appLibreta is the Libreta tab (Ruta 150): what was asked for the app and whether it is done, each line with its state computed from its branches. |
PedidoInput |
struct | PedidoInput is a request written on the Libreta tab. |
(*Server) anotarPedido |
method | anotarPedido («Anotar un pedido») writes a to-do in the Ruta, about the app and signed by the person: the libreta only shows what the Ruta has. |
DescarteInput |
struct | DescarteInput is why a request of the libreta is set aside ("" takes it up again). |
(*Server) descartarPedido |
method | descartarPedido («Descartar», «Retomar») sets a Ruta to-do or decision about the app aside with its reason, or takes it up again, keeping the version before in the Ruta's history. |
internal/api/llaves.go¶
171 lines
| Name | Kind | Summary |
|---|---|---|
LlaveView |
struct | LlaveView is one key on the Keys and settings page: whether it is set, whether it changes here (and why not), who changed it last and when it expires. |
LlavesView |
struct | LlavesView is the Keys and settings page: the keys, the settings that change here once they are tested first, and the ones that change only with Helm. |
(*Server) getLlaves |
method | getLlaves is the Keys and settings page. |
(*Server) postLlave |
method | postLlave tests a new key and, only when every test passes, saves it where it is used and makes the platform use it, with no restart. |
internal/api/llms.go¶
50 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) llmsTxt |
method | llmsTxt is /llms.txt (llmstxt.org): what an AI agent that finds this platform should know, in plain Markdown: what rendimiento is, how agents connect (MCP, with a key a person makes), what they may do, and the rules. |
internal/api/logs.go¶
88 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) StepLogText |
method | archivedLog reads a step log from the log archive, or explains why it cannot: expired by the retention rule, or the archive is unreachable. |
(*Server) archivedLog |
method | |
(*Server) releaseTaskLog |
method | releaseTaskLog serves the log of a release's post-deploy task. |
(*Server) dryTaskLog |
method | dryTaskLog serves the log of a check a branch's run ran en seco, against the published release, or (?on=copy) against a copy of the branch. |
internal/api/members.go¶
91 lines
| Name | Kind | Summary |
|---|---|---|
memberLogin |
func | memberLogin is a name a person can be added by: their GitHub username, or a GitLab or Bitbucket account's user@host. |
(*Server) listMembers |
method | listMembers lists the organization's people and their roles. |
(*Server) putMember |
method | putMember adds a person by the name they sign in with (ana on GitHub, [email protected], [email protected]), or changes their role. |
(*Server) deleteMember |
method | deleteMember takes a person out; their sessions stop working at once. |
internal/api/mercado.go¶
181 lines
| Name | Kind | Summary |
|---|---|---|
puestoView |
struct | puestoView is a page in the Mercado: its card, and its app's state. |
mercadoView |
struct | |
(*Server) listMercado |
method | listMercado is the Mercado page: whether it is on, and every stall with its app's state. |
readPagina |
func | readPagina decodes a page from the form, photos and all. |
(*Server) previewMercado |
method | previewMercado renders the page as the form fills it. |
(*Server) openPuesto |
method | openPuesto opens a stall from the form: its repository, app and first version (see mercado.Abrir). |
(*Server) puesto |
method | puesto finds the page named in the path, or answers 404. |
(*Server) getPuesto |
method | getPuesto is a stall's page as its form edits it. |
(*Server) savePuesto |
method | savePuesto saves a changed page; its build and deploy follow on their own. |
internal/api/mesa.go¶
82 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) appMesa |
method | appMesa is the app's work board: what is open on each branch and who it waits for. |
MesaCount |
struct | MesaCount is how many lines of an app's board wait for a person. |
(*Server) mesaCounts |
method | mesaCounts is, for the home page, how many things wait for a person in each of the organization's apps (those with none are left out). |
(*Server) closeSpare |
method | closeSpare closes a branch the work board calls spare (a copy, or forgotten): its pull request without merging, and the branch itself. |
internal/api/notifications.go¶
34 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) testNotification |
method | testNotification sends a sample email now, so the setup can be checked from the Environment page. |
internal/api/opiniones.go¶
527 lines
| Name | Kind | Summary |
|---|---|---|
OpinionEntrante |
struct | OpinionEntrante is a comment as it comes: from an installation (Ficha and Datos) or from the public form (Correo, Nombre). |
(*Server) recibirOpinion |
method | recibirOpinion keeps a comment for the team (POST /api/senales/comentarios, no session), only where señales are received. |
remitente |
func | remitente is who sent a request, for the limits: the visitor's address as Cloudflare or the ingress pass it on, else the connection's. |
(*Server) opinionesVisibles |
method | opinionesVisibles: the comments' routes answer only where comments are received; elsewhere, 404. |
(*Server) listarOpiniones |
method | listarOpiniones are the comments, newest first, without emails. |
opinionID |
func | |
(*Server) verOpinion |
method | verOpinion is one comment with its email (seen only here) and answer. |
(*Server) cambiarOpinion |
method | cambiarOpinion changes a comment's class, state, group or draft. |
(*Server) reclasificarOpinion |
method | reclasificarOpinion asks the AI to sort and draft a comment again. |
(*Server) pasarOpinionALaRuta |
method | pasarOpinionALaRuta makes a comment an idea in the Ruta, with this person as its author, and has the AI draft its answer again, now saying it was noted (an answered comment keeps what was sent). |
(*Server) responderOpinion |
method | responderOpinion sends a person's answer to a comment, with their name: by email to whoever wrote from the form; kept for the installation to fetch when it came from the app. |
correoRespuesta |
func | correoRespuesta is the email with a person's answer: from them, with the comment it answers, in the comment's language; one email, no links. |
(*Server) cuentaOpiniones |
method | cuentaOpiniones is how many comments wait for a person, for the bell (0 where comments are not received). |
(*Server) respuestaOpinion |
method | respuestaOpinion gives an installation the answer to its comment (GET /api/senales/comentarios/{id}/respuesta, no session): only to whoever holds the token whose hash came with it (X-Ficha). |
(*Server) notaRespuesta |
method | notaRespuesta notes in the platform's log that an installation asked for the answer to comment id, and what it got (200 the answer, 204 none yet, 404 no such comment or not its token): so one can tell later whether an installation asked. |
MisComentariosView |
struct | MisComentariosView is the page to write to the team: whether comments can go from here (señales on) and why not, the comment exactly as it would go, and the person's comments with their answers. |
idiomaDe |
func | idiomaDe is the request's language, "es" or "en" (i18n.FromRequest). |
(*Server) abrirMisComentarios |
method | abrirMisComentarios is the page to write to the team as a person opens it: it first asks rendimiento.ai for the answers still missing (at most once a minute, for at most AlVerEspera), so an answer shows as soon as someone looks for it. |
(*Server) verMisComentarios |
method | verMisComentarios is the page to write to the team; it marks the person's answers as seen. |
(*Server) enviarMiComentario |
method | enviarMiComentario sends a person's comment to the team, as the page showed it would go, and keeps it here with its token. |
(*Server) respuestasEquipoSinVer |
method | respuestasEquipoSinVer is how many answers to the person's comments to the team they have not seen, for the bell. |
internal/api/orgs.go¶
130 lines
| Name | Kind | Summary |
|---|---|---|
Me |
struct | Me is who is signed in: their role in the organization they work in, and whether they also run the platform (its organization's administrators). |
(*Server) me |
method | me is the signed-in person, for the top bar. |
(*Server) listOrgs |
method | listOrgs lists the organizations the person belongs to, with their role. |
(*Server) createOrg |
method | createOrg makes an organization with the person as its administrator (the platform's operators only, while organizations are by invitation). |
(*Server) switchOrg |
method | switchOrg moves the session to another organization the person belongs to. |
internal/api/platica.go¶
779 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) platicaRoutes |
method | platicaRoutes are the conversations' routes, and the cap per conversation on the AI page. |
PlaticaIA |
struct | PlaticaIA is one AI a conversation may choose: one of the AI page's providers (local, own, platform) with its model and about what one message costs, or the person's own agent (agente). |
PlaticaView |
struct | PlaticaView is a conversation as its page shows it. |
(*Server) platicaEntry |
method | platicaEntry is the entry {id} of the person's organization that they may see, to talk about; lo vivido, people's stories, is not talked over with an AI. |
(*Server) platicaIAs |
method | platicaIAs are the AIs a conversation of the organization may choose: the AI page's that can answer now (the local model, the organization's own key, the platform's within its allowance) and the person's own agent. |
platicaElegida |
func | platicaElegida is who answers a conversation now: the one it chose, if it can still answer; else the organization's provider, if it can; else the first that can. |
(*Server) platicaView |
method | platicaView reads a conversation for its page. |
(*Server) getPlatica |
method | getPlatica is the conversation about an entry, for its page (polled). |
paga |
func | paga says whether an AI a conversation chose costs money. |
(*Server) postPlatica |
method | postPlatica writes a person's message, signed with their login, and has the AI the conversation chose answer it (its own agent answers over MCP). |
(*Server) turnoPlatica |
method | turnoPlatica has the conversation's AI answer what people wrote: one turn at a time per conversation (a message written meanwhile is answered next, up to three in a row), within its cap. |
(*Server) putPlaticaIA |
method | putPlaticaIA is who answers a conversation from now on: one of the AIs it may choose. |
(*Server) putPlaticaIdea |
method | putPlaticaIdea is a person's correction of «la idea hasta ahora». |
PropuestaItem |
struct | PropuestaItem is a proposed encargo, priced as the estimator prices it and with who should do it by the organization's amount. |
PropuestaView |
struct | PropuestaView is the AI's proposal of encargos, for a person to change before creating them: with the estimator's prices for every difficulty (for one they add), the amount that decides the route, the apps they may choose and what the coding agent does. |
(*Server) appsParaEncargos |
method | appsParaEncargos are the organization's apps the person may ask encargos of (collaborator there). |
(*Server) proponerPlatica |
method | proponerPlatica asks the conversation's AI for the encargos that carry out what it decided (its own agent's conversation asks the organization's provider), priced by the estimator. |
PlaticaEncargosInput |
struct | PlaticaEncargosInput is what a person creates from the proposal: the encargos they kept (each with its app, difficulty, who does it and the earlier ones it comes after), whether to save the decision in the Ruta, and whether to send the platform AI's ones to the coding agent now. |
PlaticaEncargosView |
struct | PlaticaEncargosView is what was made: the encargos, the decision entry, how many went to the coding agent, and why not, when they did not. |
palabrasDe |
struct | palabrasDe are the words the made encargos and decision carry, in the person's language. |
(palabrasDe) say |
method | |
(*Server) encargosDePlatica |
method | encargosDePlatica creates the encargos a person kept from the proposal, each carrying the conversation, its idea and the decision (so the agent knows why), priced as the estimator prices it; saves the decision as a Ruta entry linked to the one talked about; and sends the platform AI's to the coding agent when asked. |
(*Server) estimador |
method | estimador prices encargos as the estimator does (the list prices when the platform has no AI gateway). |
(*Server) getPlaticaTope |
method | getPlaticaTope is what one conversation may spend before it asks. |
(*Server) putPlaticaTope |
method | putPlaticaTope sets what one conversation may spend before it asks whether to go on: $0.05 to $20. |
internal/api/preguntas.go¶
68 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) answerEncargo |
method | answerEncargo is a person's answer to what the coding agent asks about an encargo: it goes back to the agent's queue, to go on on its branch. |
(*Server) passEncargo |
method | passEncargo gives an encargo the coding agent asks about to the person's own agent, with the question in its history. |
internal/api/probados.go¶
187 lines
| Name | Kind | Summary |
|---|---|---|
AjusteValor |
struct | AjusteValor is one variable of a setting tested before it changes: the value in use, the ConfigMap's, and who saved the one in use here, if someone did. |
AjusteProbadoView |
struct | AjusteProbadoView is one setting tested before it changes, on the Keys and settings page. |
(*Server) ajustesProbadosView |
method | ajustesProbadosView are the settings tested before they change. |
(*Server) probadosListo |
method | probadosListo answers why the settings cannot change in this process, or false when they can. |
(*Server) probarAjuste |
method | probarAjuste tests new values of a setting, against the cluster and the services themselves. |
(*Server) cambiarAjuste |
method | cambiarAjuste saves the values a test passed with and restarts the platform so it takes them. |
(*Server) volverAjuste |
method | volverAjuste forgets the value saved here: the ConfigMap's holds again, after a restart. |
(*Server) identidad |
method | identidad answers who this platform is: the nonce signed with the key only its processes have. |
internal/api/problems.go¶
91 lines
| Name | Kind | Summary |
|---|---|---|
ProblemList |
struct | ProblemList is the Problems page: what went wrong in the platform in the last 30 days, newest first, and how many problems are open. |
(*Server) listProblems |
method | listProblems is the Problems page: warnings and errors the platform logged recently (an app's, or all), repeats grouped. |
(*Server) problemCount |
method | problemCount is the navigation badge's number. |
(*Server) dismissProblem |
method | dismissProblem hides a problem until it happens again. |
internal/api/public.go¶
217 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) StatsHandler |
method | StatsHandler serves only GET /api/public/stats: for an internal-only listener (STATS_LISTEN) that the public ingress does not route, so the numbers reach the cluster's own pages but not the internet. |
PublicStats |
struct | PublicStats is what GET /api/public/stats returns: aggregate numbers for a public page (a portfolio, a status page). |
publicSite |
struct | |
publicNode |
struct | |
publicCluster |
struct | |
publicCache |
struct | publicCache keeps the last answer for a minute, so visitors cannot make the platform recompute it on every page view. |
(*Server) publicStats |
method | publicStats serves PublicStats when PublicStats is on (no login needed). |
(*Server) buildPublicStats |
method | buildPublicStats computes the public numbers: delivery over 30 days and each public site's uptime over 90 days. |
PublicActivity |
struct | PublicActivity is what GET /api/public/activity returns, for the welcome page: the runs going on now and the latest releases, by app name only (no repositories, commits, branches, messages or errors). |
activityCache |
struct | activityCache keeps the last answer for 15 seconds. |
(*Server) publicActivity |
method | publicActivity is the welcome page's "right now", without login: the runs going and the latest releases (cached 15 seconds). |
internal/api/publicadas.go¶
212 lines
| Name | Kind | Summary |
|---|---|---|
Published |
struct | Published is what the update card shows to the platform's administrators: the version running here, the latest published one, whether it is newer, whether it only brings fixes, and how this install takes it. |
ArchivoAjustes |
struct | ArchivoAjustes is the file of NAME=value lines a computer's service reads its settings from when it starts, and how to restart it to read them again. |
(*Server) platformPublished |
method | platformPublished is the update card: only for the platform's own administrators (decision 138), since a version changes every organization's rendimiento. |
(*Server) AutoUpdate |
method | AutoUpdate installs fix releases by itself on a computer, while the switch is on (decision 138): only a newer version with the same major and minor (0.2.0 → 0.2.1), signed, and never one that already failed to stay up here. |
(*Server) autoUpdateTo |
method | autoUpdateTo installs the release updating by itself may take, and says which ("" when none). |
(*Server) platformAutoUpdate |
method | platformAutoUpdate turns updating by itself on or off. |
(*Server) platformInstall |
method | platformInstall installs the latest published version on this computer and restarts rendimiento in it: only that version, newer and signed. |
(*Server) platformBack |
method | platformBack puts the previous version back, only a lower one. |
(*Server) restartSoon |
method | restartSoon answers, then ends the process a moment later so the service starts the program now in place. |
internal/api/rastreo.go¶
36 lines
| Name | Kind | Summary |
|---|---|---|
TrackerTag |
func | TrackerTag is Umami's script for rendimiento's own pages, so the platform's visits are counted like any app's: umamiURL is Umami's public address (UMAMI_PUBLIC_URL) and id the website Umami gave rendimiento (UMAMI_WEBSITE_ID). |
withTracker |
func | withTracker is the page with the tracker's tag at the end of its head. |
withCountryLang |
func | withCountryLang is the page with the language of the visitor's country (i18n.CountryDefault) at the end of its head, for the UI to start in when none of the browser's languages is Spanish or English (web/src/i18n.ts). |
internal/api/registro.go¶
138 lines
| Name | Kind | Summary |
|---|---|---|
timedWriter |
struct | timedWriter remembers the status, and whether the answer was streamed. |
(*timedWriter) Flush |
method | Flush marks the answer as a stream (live events), which is long on purpose. |
(*Server) registrando |
method | registrando notes in the platform's log the requests nobody saw before: one slower than SlowRequest (INFO) and one that failed with a 5xx (WARN), with the route's pattern (never the path itself, its query, body or headers), the method, the status and the milliseconds. |
streaming |
func | streaming is a live-event answer. |
(*Server) noteRequest |
method | noteRequest writes a request's line, if it deserves one. |
LogPage |
struct | LogPage is a page of the platform's log, and the cursor of the next. |
levelsFrom |
func | levelsFrom are the levels shown for ?nivel=: that one and the worse. |
(*Server) listRegistro |
method | listRegistro is the platform's log, newest first: ?proceso=, ?app=, ?nivel= (at least), ?desde= and ?hasta= (RFC 3339), ?q= (in the message), ?antes= (the cursor of the page before) and ?limite= (up to 200). |
internal/api/reliability.go¶
77 lines
| Name | Kind | Summary |
|---|---|---|
releaseMark |
struct | |
reliabilityView |
struct | |
(*Server) reliability |
method | reliability returns an app's uptime checks over a range (24h, 7d or 30d): per check, uptime, response times and chart buckets; its outages; and its releases, to mark on the charts. |
internal/api/resumen.go¶
132 lines
| Name | Kind | Summary |
|---|---|---|
SummaryView |
struct | SummaryView is the home page's summary: a block per day since the reader's last visit (at most SummaryDays, at least yesterday), newest first, with only the lines of apps the reader may see. |
(*Server) summaryTZ |
method | summaryTZ is where days begin and end: the public stats' time zone, or UTC. |
summaryDays |
func | summaryDays are the days to show to someone who last came on last ("" never): yesterday, and the days before it since that visit, at most SummaryDays, newest first. |
(*Server) getSummary |
method | getSummary is the home page's summary. |
(*Server) redoSummary |
method | redoSummary writes a day's summary again, in the background (Rehacer). |
internal/api/ruta.go¶
331 lines
| Name | Kind | Summary |
|---|---|---|
RutaInput |
struct | RutaInput is what a person writes or changes on the Ruta page. |
(*RutaInput) check |
method | check tidies an entry from the Ruta page (trimmed title, lowercase tags) and says what is wrong with it, or "". |
(*Server) rutaApp |
method | rutaApp checks the app an entry from the Ruta page is to be about: "" for none, else one of the organization's apps the person enters. |
(*Server) listRuta |
method | listRuta is the Ruta page's list: entries by kind and text. |
(*Server) addRuta |
method | addRuta writes an entry from the Ruta page, signed by the person. |
rutaID |
func | rutaID reads the entry ID from the URL (400 when it is not a number). |
(*Server) updateRuta |
method | updateRuta changes an entry from the Ruta page. |
(*Server) archiveRuta |
method | archiveRuta hides an entry from lists; it is kept. |
RutaActivity |
struct | RutaActivity is the agents' side of the Ruta page: their turns and what they did. |
(*Server) rutaActivity |
method | rutaActivity is the Ruta's Activity tab: agents' cargos and every tool call they made. |
NewAgentKey |
struct | NewAgentKey asks for a key. |
CreatedAgentKey |
struct | CreatedAgentKey is the answer: the token appears here once and never again. |
(*Server) listAgentKeys |
method | listAgentKeys lists the agents' keys (names and rights; never the keys). |
(*Server) createAgentKey |
method | createAgentKey makes a key for an agent, read-only or able to write, that lasts the days asked for. |
(*Server) revokeAgentKey |
method | revokeAgentKey stops a key from working. |
internal/api/selfupdate.go¶
44 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) platformVersion |
method | platformVersion says which release of rendimiento runs and whether a newer one is ready (the Environment page's "Update" button). |
(*Server) updatePlatform |
method | updatePlatform switches rendimiento to a release's image; this process is replaced a few seconds after it answers. |
internal/api/senales.go¶
168 lines
| Name | Kind | Summary |
|---|---|---|
(*Server) recibirSenal |
method | recibirSenal keeps a señal de vida from an installation (POST /api/senales, no session: installations have none here). |
SenalesView |
struct | SenalesView is what the operators see of this installation's señales: whether they go (and why not), when the last went, whether they saw the notice, and the next one exactly as it would go. |
(*Server) verSenales |
method | verSenales is the operators' view of the señales (and, where they are received, what they say). |
(*Server) putSenales |
method | putSenales turns the señales on or off, or records that the operators saw the notice ({"encendidas": false} or {"avisoVisto": true}). |
(*Server) listarInstalaciones |
method | listarInstalaciones are the installations whose señales came here (where SenalesRecibir is on), the most recent first. |
(*Server) marcarEquipo |
method | marcarEquipo marks an installation as the team's own, or not ({"equipo": true}): counted apart, never in the numbers given out. |
internal/api/server.go¶
2331 lines
| Name | Kind | Summary |
|---|---|---|
CredentialStore |
interface | CredentialStore persists the GitHub App credentials (a Kubernetes Secret in production). |
Server |
struct | Server holds everything the HTTP API needs; Handler returns its routes. |
Analytics |
interface | Analytics is where visitor numbers come from (Umami). |
(*Server) Handler |
method | Handler returns the HTTP handler: public routes (health, webhooks, login, setup), session-protected /api routes and the embedded UI. |
clusterOnly |
func | clusterOnly is a platform route about the cluster itself (its environment, services, add-ons, namespaces): without a cluster it answers 503. |
(*Server) redirectHosts |
method | redirectHosts sends people who visit one of RedirectHosts (an old address) to BaseURL, same path and query (308). |
(*Server) guard |
method | guard adds security headers and rejects cross-site state changes. |
sameOrigin |
func | sameOrigin reports whether a browser's Origin header names the host the request came in on (behind the ingress, X-Forwarded-Host). |
hashToken |
func | hashToken is what the database keeps of a session token: its SHA-256, so a copy of the sessions table cannot be used to sign in. |
randomToken |
func | randomToken is 32 random bytes in hex: session tokens and OAuth states. |
route |
struct | route is an authenticated route, the least role it takes, and whether that role counts in the platform's organization rather than the person's current one. |
roleKey |
struct | |
orgKey |
struct | |
roleOf |
func | roleOf is the signed-in person's role in their current organization (set by requireRole). |
orgOf |
func | orgOf is the organization the signed-in person works in (set by requireRole). |
(*Server) requireRole |
method | requireRole wraps a handler for signed-in members: it reads the session cookie, finds whose it is and their role in the organization, answers 401 without a session or membership and 403 below the route's role, and passes the login on. |
(*Server) forja |
method | forja is where the apps' code lives: GitHub, through its App (step 2 of Ruta 102 picks it per app). |
(*Server) secureCookies |
method | secureCookies: cookies are HTTPS-only when the platform is served on HTTPS. |
(*Server) login |
method | login starts "Sign in with GitHub": it sets a random state in a cookie and sends the browser to GitHub, which comes back to callback with a code. |
(*Server) loginElsewhere |
method | loginElsewhere is BaseURL's login address when r came in on another host (an old or extra domain of the platform), or "". |
(*Server) callback |
method | callback finishes the GitHub sign-in: it checks the state against the cookie (so nobody can make you sign in as them), trades the code for the GitHub login, refuses logins not in ALLOWED_USERS, and opens a session of 7 days. |
(*Server) openSession |
method | openSession signs login in, once a forja said who they are: it refuses logins that are no one's member, and opens a session of 7 days. |
(*Server) openSessionTo |
method | openSessionTo is openSession, and then the browser goes to "to". |
(*Server) Session |
method | Session signs login in, as GitHub's login does: the cookie of a new session. |
(*Server) logout |
method | logout deletes the session and its cookie. |
(*Server) setupStatus |
method | setupStatus tells the UI, before anyone signs in, whether the platform is installed (else the setup page shows, with its state), whether the GitHub App exists (and where to install it), which forjas one can sign in with, whether the welcome page shows what is happening, and where the book is. |
(*Server) checkSetupToken |
method | checkSetupToken guards the one-time GitHub App setup: it is refused once the App exists. |
(*Server) setupStart |
method | setupStart is the page that posts the App's manifest (name, permissions, webhook URL) to GitHub, which creates the App and sends you back to setupCallback. |
(*Server) setupCallback |
method | setupCallback receives the new App from GitHub (its ID, private key and secrets, traded for the code), stores it in the rendimiento-github secret, starts using it without a restart, and sends you on to install it. |
(*Server) webhook |
method | webhook receives GitHub's events. |
(*Server) gitlabWebhook |
method | gitlabWebhook receives the GitLabs' events: a delivery whose X-Gitlab-Token is no connection's is refused. |
(*Server) webhookFrom |
method | webhookFrom reads a forja's delivery and acts on it. |
(*Server) atenderEvento |
method | atenderEvento acts on a forja's event: a pull request opened or closed, and a push, which queues runs. |
(*Server) installationAllowed |
method | installationAllowed answers 403 for an installation the organization may not use (see usable), and for a repository not on its account; nil means the answer was already written. |
(*Server) installations |
method | installations lists the accounts this organization may create apps from (usable), and the ones its administrator could connect (the App on their own GitHub account), for the "New app" wizard's first choice. |
(*Server) repos |
method | repos lists the repositories one installation can see, for the wizard. |
(*Server) zones |
method | zones lists the DNS zones apps can have addresses in (the DNS provider's, plus DNS_ZONE), for the wizard's domain field. |
(*Server) propose |
method | propose looks at a repository (detects its languages, ports, Dockerfiles) and answers the rendimiento.yaml it would write, without writing anything: the wizard's form starts from it. |
(*Server) services |
method | services is the Services page: everything running in the cluster, apps and not, with what calls what (cached; ?refresh=1 rebuilds it). |
(*Server) universe |
method | universe is the Universe page: every app from above, with its services, what they use and call, what the internet reaches, and their health. |
(*Server) universeSpans |
method | universeSpans lists what one observed service does, from its traces: the routes it serves, its own moments (the observa libraries' tramos) and the calls it makes, each with calls per minute, errors and latency over ?window=. |
(*Server) universeTraces |
method | universeTraces lists the requests the traces service kept, newest first: those that went through ?service=app/service (all without it), only the failed ones with ?errors=1, older than ?before= (RFC 3339) to page back. |
(*Server) orgApps |
method | orgApps are the names of the apps in the person's organization that they may see. |
throughOrg |
func | throughOrg says whether a request went through one of the organization's apps (services are app/service). |
(*Server) universeTrace |
method | universeTrace is one kept request with its spans: the waterfall. |
(*Server) environment |
method | environment is the Environment page's report: what the cluster has, what rendimiento needs from it, and what is wrong (cached; ?refresh=1 checks again). |
(*Server) dnsSync |
method | dnsSync re-detects the public IP now and repoints records that follow it. |
(*Server) migration |
method | migration tells the wizard whether an app name matches a namespace that already runs something (so it can be migrated instead of duplicated). |
appView |
struct | |
(*Server) downChecks |
method | downChecks maps each app to its checks with an open outage. |
(*Server) view |
method | view is an app as the UI shows it: the stored app, its live status from its destination, and its last run. |
(*Server) listApps |
method | listApps is the Apps page: every app with its status, last run, uptime of the last 24 hours and any checks failing right now. |
(*Server) repoAllowed |
method | repoAllowed checks the repository of a proposal or a new app on its forja; false means the answer was written. |
(*Server) createApp |
method | createApp onboards a repository from the wizard: it registers the app and opens the pull request that adds rendimiento.yaml or, when the repository already has one (existing), queues its first build. |
(*Server) app |
method | app loads the app named in the URL, answering 404 when there is none; a nil result means the answer was already written. |
(*Server) getApp |
method | getApp is one app's page. |
(*Server) deleteApp |
method | deleteApp removes an app and everything rendimiento made for it (namespace, DNS records). |
(*Server) deleteImpact |
method | deleteImpact lists what deleting the app would remove, for the confirmation dialog. |
(*Server) disconnectApp |
method | disconnectApp stops managing the app but leaves it running. |
(*Server) listRuns |
method | listRuns is an app's Runs tab: its last 50 runs. |
(*Server) branchKinds |
method | branchKinds is what kind each branch of the app's last runs is (the default branch, a fix, a feature, a release...), for the Runs tab. |
(*Server) appCaminos |
method | appCaminos is the Caminos tab: the app's last two weeks of runs, drawn as the default branch and the branches that leave and rejoin it. |
(*Server) triggerRun |
method | triggerRun queues a run by hand ("Run now"), of the default branch unless another is given. |
(*Server) listReleases |
method | listReleases is an app's Releases tab: its last 50 releases, each with its deploy tasks. |
(*Server) rollback |
method | rollback makes a new release with the images of an earlier one; the controller then deploys it like any other. |
(*Server) resources |
method | resources is the app's resource tree, from its destination: each part with its health (Healthy, Progressing, Degraded or Missing), rolled up to the app. |
(*Server) secretTarget |
method | secretTarget is the app and the secret named in the URL, when the name is declared in rendimiento.yaml (it writes the error otherwise, and returns nil). |
secretError |
func | secretError answers a destination's error about secrets: 409 when the app has no place for them yet. |
(*Server) getSecret |
method | getSecret lists the keys a secret holds, never their values, so the page can show what is already set. |
(*Server) putSecret |
method | putSecret writes app secret values straight into the app's destination; they are never stored in git, in Postgres, or returned by the API. |
(*Server) runID |
method | runID reads the run ID from the URL (400 when it is not a number). |
(*Server) getRun |
method | getRun is one run with its steps, for the run page. |
(*Server) retryRun |
method | retryRun runs again what did not pass in a failed run (see platform.RetryRun). |
(*Server) cancelRun |
method | cancelRun stops a run: one going is cancelled in this process (its pods are deleted), one still queued is marked cancelled before it starts. |
(*Server) approveMerge |
method | approveMerge is a person's yes to merging a run's commit: rendimiento opens the branch's pull request when it has none and merges it once the run has passed. |
(*Server) openPull |
method | openPull opens a run's branch's pull request without merging it: the person's "Just open the pull request", beside "Merge this branch", and taken by the same people. |
(*Server) stepLog |
method | stepLog is one step's log as plain text, from the database or, once archived, from object storage. |
(*Server) runEvents |
method | runEvents streams a run's changes (steps starting, log lines, the end) to the run page as server-sent events. |
(*Server) appEvents |
method | appEvents streams an app's changes (new runs, releases, status) to its page. |
(*Server) sse |
method | sse streams the events of a topic as server-sent events until the browser leaves, with a comment every 20 seconds so proxies keep the connection. |
(*Server) ui |
method | ui serves the web UI built into the binary. |
writeJSON |
func | writeJSON answers 200 with v as JSON. |
writeJSONStatus |
func | writeJSONStatus sets headers before the status line; headers set after WriteHeader are silently dropped. |
readJSON |
func | readJSON decodes a request body of up to 1 MB into v, answering 400 when it is not valid; false means the answer was already written. |
httpError |
func | httpError answers {"error": msg} with a status. |
internal/api/trabajador.go¶
13 lines
internal/api/uso.go¶
176 lines
| Name | Kind | Summary |
|---|---|---|
eventoUso |
struct | eventoUso is one event as the interface sends it: a page shown ("v", with where from and, when measured, its time to data) or an action ("a"). |
(*Server) anotarUso |
method | anotarUso adds a batch of the interface's use to the day's totals. |
UsoView |
struct | UsoView is the Use page: the switch and the totals of a period. |
(*Server) verUso |
method | verUso is the use of the last 7, 14 or 30 days (?dias=, 14 by default), for the platform's administrators. |
(*Server) putUso |
method | putUso turns measuring on or off ({"encendido": false}). |
internal/api/vigia.go¶
234 lines
| Name | Kind | Summary |
|---|---|---|
VigiaVista |
struct | VigiaVista is what the Log page shows of the lookout. |
(*Server) vigiaVista |
method | |
(*Server) getVigia |
method | getVigia is the lookout's latest review, its findings and its settings. |
(*Server) vigiaNuevos |
method | vigiaNuevos is how many findings of the latest review wait for a decision (the bell). |
(*Server) revisarVigia |
method | revisarVigia asks the lookout for a review now, in the background. |
(*Server) putVigia |
method | putVigia turns the weekly review on or off and sets its monthly cap. |
(*Server) decidirHallazgo |
method | decidirHallazgo makes a person's decision on a finding: estado is encargo, ruta or descartado. |
(*Server) appDelHallazgo |
method | appDelHallazgo is the finding's app when it is an app of the platform's organization the person can act on ("" otherwise: the body names it). |
(*Server) cuerpoHallazgo |
method | cuerpoHallazgo is the body of the encargo or the Ruta entry a finding becomes: its evidence, where it came from and who accepted it, in the language agents write in. |
internal/api/visits.go¶
334 lines
| Name | Kind | Summary |
|---|---|---|
visitPeriod |
func | visitPeriod is the window a Visits request asks for: range=24h|7d|30d|today|yesterday, or day=2026-10-20 (a calendar day in the visits' time zone). |
minTime |
func | minTime is the earlier of a and b. |
VisitsView |
struct | VisitsView is an app's Visits tab: one report per Umami website whose domain is one of the app's hostnames. |
appHosts |
func | appHosts are every hostname an app's services answer on. |
(*Server) visitTZ |
method | visitTZ is the time zone visits are counted in (PUBLIC_STATS_TZ, else UTC). |
umamiError |
func | umamiError answers a failed Umami call: a refused login is a setup problem, a slow first read is still going on, anything else that Umami is unreachable. |
(*Server) visits |
method | visits is an app's Visits tab: Umami's numbers for each of its addresses today, yesterday, on a chosen day, or over the last 24 hours, 7 or 30 days, with the latest visitors of that time. |
(*Server) visitActivity |
method | visitActivity is what one visitor of an app did, page by page: the website must be one of the app's, and the window at most 31 days. |
AppVisits |
struct | AppVisits is one app's line in the dashboard summary. |
VisitsSummary |
struct | VisitsSummary is the dashboard's visitors panel: the last 7 days of every app that Umami counts, and the 7 before them. |
PlatformVisits |
struct | PlatformVisits is the dashboard's line of rendimiento's own visits. |
addStats |
func | addStats adds b's numbers to a. |
(*Server) visitsSummary |
method | visitsSummary is the dashboard's visitors: each app's total of the last days, next to the days before. |
internal/api/acceso_test.go¶
465 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPermisosPorApp |
func | An app with a list: a person on it as guest sees it and only reads it; a collaborator of the organization left off it finds nothing of it (404, never 403), in lists, by number and in the streams, and keeps acting on the other app; a guest of the organization the list makes collaborator runs CI on it only; the administrator always enters and keeps the list. |
TestEveryRouteKeepsToTheAppsList |
func | Every route, called by a collaborator of the platform's organization whom an app's list leaves out, with that app's names and numbers, finds nothing of it: 404, a refusal, or an answer that shows none of it. |
TestToolsKeepToTheKeysApps |
func | A key limited to some apps waits only for requests about them, and reads and changes only their Mercado stalls. |
internal/api/ajustes_test.go¶
181 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestLiveSettings |
func | |
TestSettingsDoNotWaitForTheCluster |
func | A cluster slow to answer (an update rolling out) does not hold the settings up: they come at once, with the apps outside the wall to come, and the next look has them. |
internal/api/arreglos_test.go¶
48 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestAddFixYAML |
func | A recipe fix is added to rendimiento.yaml as text: at the end of its fixes: list (keeping comments and the keys after it), or as a new list. |
TestFixName |
func | A fix's name is its recipe and folder, not taken by anything else. |
internal/api/barda_test.go¶
88 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestBardaShowsWhatTheBoundaryCovers |
func |
internal/api/bitbucket_test.go¶
175 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestBitbucketConnection |
func | An operator connects a workspace and authorizes it; its webhooks are heard only when signed with its secret; the wizard lists its repositories; a person links their Bitbucket account and signs in with it as themselves, and an account linked to no one comes in only as a member named [email protected]. |
internal/api/catalogo_test.go¶
120 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCatalogPagesDoNotWaitForTheCluster |
func | A cluster slow to answer (an update rolling out) does not hold up the pages that read the services catalog: an app's wall, the Universe, the Services page and the check before turning the wall on all come at once, with what the cluster has not said yet pending, and the next look after it answers has it. |
internal/api/corriendo_test.go¶
67 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCorriendo |
func | Running now: the runs going on in the person's organization, with their steps, and the last that ended; never another organization's. |
internal/api/dormir_test.go¶
90 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestDormirRoutes |
func | In a cluster the sleep's routes answer 409; on a computer only an administrator puts it to sleep, the webhooks that arrive meanwhile are kept (not acted on), and waking handles them in order and says so. |
internal/api/fallas_test.go¶
141 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestFallasUI |
func | The UI's error pages reach the Problems page: grouped by kind and page, with where the person came from, every field checked and bounded, and nothing of who saw it, neither in the problem nor in the bitácora. |
TestFallaTexto |
func | What the browser sends is checked as untrusted text (no database needed). |
internal/api/forjas_test.go¶
177 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestGitLabConnection |
func | An operator connects a GitLab and authorizes it; its webhooks are heard only with its token; the wizard lists its projects; a person links their GitLab account and signs in with it as themselves, and an account linked to no one comes in only as a member named user@host. |
internal/api/ia_cuentas_test.go¶
84 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestIACuentas |
func | «How the coding agent is doing» is read by every member of the organization who sees the AI page (a guest too), of their own organization only, over a period offered; nobody signed out reads it. |
internal/api/inicio_test.go¶
165 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCompletarInicio |
func | A list kept from an older version gains the sections it lacks, where the base has them; unknown and repeated ones are dropped. |
TestInicioAPI |
func | Each person lays out their own home page, any role; a platform administrator sets the default for whoever never chose; Back to the usual forgets one's own. |
TestInicioListMatchesTheUI |
func | The interface knows the same sections, in the same order and with the same first state (web/src/inicio.ts). |
internal/api/instalaciones_test.go¶
212 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestAppsFromAnOrganizationsOwnGitHub |
func | An organization's administrator creates apps from the GitHub accounts that are provably theirs (the App on their own account, connected by them) or that an operator gave it, and from no other: not the platform's, not another organization's, not one nobody gave it. |
internal/api/instalar_test.go¶
215 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestClaveDeLogin |
func | Each name signs in with its own forja: no "@" is GitHub's, @bitbucket.org Bitbucket's, any other host a GitLab's; linked accounts add theirs. |
TestPierdenAcceso |
func | Taking a forja away: who signs in only with it loses access (and the administrators among them are named apart); someone with another account that still works keeps it, and someone who could not sign in before is not counted. |
TestInstallWithGitLab |
func | A fresh platform installed with GitLab: the setup token opens an install session (nothing works without it); the GitLab is connected and authorized from the setup page; whoever authorized it comes back signed in as the first administrator, though ALLOWED_USERS does not name them; then every door of the setup page is closed. |
TestInstallWithGitHub |
func | With GitHub, the App's setup works with the install session, and only the browser that started it may hand rendimiento an App: the manifest's state comes back with GitHub's code. |
internal/api/libreta_test.go¶
139 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestLibreta |
func | «Anotar un pedido» writes a to-do in the Ruta about the app; the libreta shows it, with the state its branch's run gives it, beside the app's encargos; setting it aside on the Ruta page shows it as discarded. |
TestLibretaLinksFromGitHub |
func | A pushed commit's «Ruta: N» links its branch to those entries (the app's or no app's, never another app's), even when the push is not run; the pull request's merge, from GitHub's webhook, is kept on the link. |
internal/api/mcp_orgs_test.go¶
364 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestEveryToolStaysInItsOrg |
func | Every MCP tool, called with a key of another organization and the first organization's names and numbers, finds nothing of it: it says the thing does not exist (or refuses), or answers with her own organization's and shows none of the first's. |
internal/api/mesa_test.go¶
60 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestMesa |
func |
internal/api/opiniones_test.go¶
287 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestRecibirOpinion |
func | The comments endpoint answers only where señales are received, keeps a comment from the form (with its email) and one from an installation (with only the data its person saw), turns away the malformed, drops what robots send as if kept, and holds a sender to three an hour. |
TestBuzonAPI |
func | The team's page: the comments are listed without emails, one is read with its email, changed, answered once by email with the person's name, and set aside; the bell counts those waiting. |
TestAlEquipoYDeVuelta |
func | From an installation to the team and back: the page shows exactly what would go; Send keeps the comment here and there; the answer a person sends there is fetched with the token, lands here, counts in the bell until seen. |
TestOpinionALaRuta |
func | A person passes a comment to the Ruta: it becomes an idea with their name and the comment's words quoted, the comment links to it and goes back for the AI to draft its answer again; once only. |
TestNotaRespuesta |
func | An installation asking for an answer leaves a line in the log with the comment's number and what it got, never the token. |
internal/api/platica_test.go¶
321 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPlaticarUnaEntrada |
func | Platicar una entrada, the whole way: the AIs it may choose (the AI page's that can answer, each with its price, and the person's own agent); a person's message, answered by the chosen AI, signed with its model, saying what it read and keeping the idea; another person joining; the cap per conversation, which asks before going on; lo vivido, never talked over with an AI; and «Ya está»: the proposal, priced by the estimator, and the encargos and the decision made of it, each carrying the conversation. |
TestPlaticaMiAgenteEspera |
func | With «Mi agente», a person's message waits for their own agent: the platform's AI does not answer it. |
internal/api/preguntas_test.go¶
90 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestAnswerTheCodingAgent |
func | What the coding agent asks shows first on «Para usted»; a person answers it (back to the agent's queue) or passes it to their own agent. |
internal/api/publicadas_test.go¶
193 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPlatformPublished |
func | The platform's administrators see the published version, newer or not, and how this install takes it; a collaborator does not. |
TestPlatformInstall |
func | On a computer, the latest signed version is installed from the card and rendimiento restarts in it; a collaborator cannot, nor can another one. |
TestAutoUpdate |
func | With the switch on, a fix release installs itself; a release with new features, or one that already failed to stay up here, does not. |
internal/api/rastreo_test.go¶
77 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestTrackerTag |
func | The tag is written only from an address and a website id that are what they should be. |
TestUITracker |
func | With a tracker, every page of the UI carries its tag; the assets do not change, and without one the page is the built one. |
TestUILangPais |
func | A browser asking only for other languages gets its country's language in the page (never the country itself); a browser that asks for Spanish or English, a crawler without Accept-Language, and a request not behind Cloudflare get the built page. |
internal/api/registro_test.go¶
196 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestRequestLines |
func | Slow requests and 5xx answers are noted with the route's pattern, never the path or its query; live streams are not slow; only a 500 reaches the Problems page, one problem per route. |
TestRegistroAPI |
func | The Log page's API: platform administrators only, filters and a cursor. |
internal/api/reintentar_test.go¶
79 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestRetryWhatFailed |
func |
internal/api/resumen_days_test.go¶
21 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestSummaryDays |
func |
internal/api/resumen_test.go¶
99 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestTheDaysSummary |
func |
internal/api/server_test.go¶
1840 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestAuthBoundaries |
func | |
TestWebhookSignature |
func | |
TestSetupStatusSaysWhetherGitHubIsConnected |
func | The welcome page learns from the setup status whether "Sign in with GitHub" leads anywhere: only once the GitHub App is set up. |
TestSetupRequiresToken |
func | |
TestSecretsAndDelete |
func | |
TestUniverse |
func | |
TestBranchKinds |
func | The Runs tab's kinds of branch: without GitHub they come from the branch names, and the default branch is always the main one. |
TestUIMissingAsset |
func | A file under assets/ that is not there (an older release's page code) is a 404, not the page: the browser would otherwise read the HTML as a script; and the 404 is not kept by a cache. |
TestUIServiceWorker |
func | The service worker and the manifest are asked for again each time (no-cache), with their own types; with SERVICE_WORKER=off (or a UI built without it) /sw.js is the worker that unregisters itself, marked so the page registers none. |
TestUIFallback |
func | |
TestJSONStatusKeepsContentType |
func | Regression: 201 responses were sent without Content-Type because the header was set after WriteHeader, and the UI then read them as text. |
TestMigrationCheckByName |
func | |
TestPublicStats |
func | Public stats are off unless turned on, need no login when on, allow only the configured origins, and say nothing private. |
TestDeliveryReport |
func | The dashboard's delivery report needs a login and has both periods and twelve weeks. |
TestProblemsAPI |
func | The Problems page needs a login; problems can be listed, counted and dismissed. |
TestSpanishAnswers |
func | A browser that asks for Spanish gets the platform's messages in Spanish; names and English requests are left alone. |
TestRutaAPI |
func | |
TestVisitsAPI |
func | |
TestPublicActivity |
func | The welcome page's activity is off unless asked for, and names only the app. |
TestLoginStartsOnBaseURL |
func | |
TestRedirectHosts |
func | People visiting an old address go to BaseURL with the same path; what machines call there (webhooks, MCP, public stats, health) still answers. |
TestLLMsTxt |
func | /llms.txt tells an agent how to connect, without naming apps or people. |
TestEncargosAPI |
func | A person asks agents for something (from a failed run, the app is filled in), and reviews what comes back: sending it back needs a comment. |
TestRouteRoles |
func | Every route takes at least the role it declares: a guest may read, but not act or administer; a collaborator may act, but not administer; a stranger with a session is not let in at all. |
TestMembersAPI |
func | An administrator adds and removes people; the last administrator stays. |
TestOrgIsolation |
func | Two organizations: nothing of one is seen from the other (apps, runs, the Ruta, encargos, agent keys, members), the platform's routes are for its operators only, and a person switches between their organizations. |
TestDemoLinks |
func | A demo link opens a read-only session in its organization, never in the platform's: it sees that organization's apps and nothing else, cannot act even if its guest was given more, and stops working once turned off. |
TestIAAPI |
func | An organization's administrator picks the AI provider and keeps its own key (shown only by its end); anyone collaborating tries it, measured; the operator gives allowances of the platform's AI. |
TestDiagnosisFeedback |
func | Judging a diagnosis teaches the diagnostician: a correction needs the real cause, and either answer becomes one known failure in the Ruta (judging again updates it). |
TestLocalizedStreams |
func | A stream reaches the browser as it is written, in Spanish too: the translating middleware must not hold it (the activity stream answered "streaming unsupported" to every Spanish page). |
TestEveryRouteStaysInItsOrg |
func | Every route of an organization, called by another organization's administrator with the first organization's names and numbers, finds nothing of it: a 404 (or a refusal), or an answer of her own organization's that shows none of the first's. |
TestRoutesOutOfTheBitacora |
func | The routes kept out of the bitácora, all registered with anonima and each with its reason. |
TestEveryChangeIsInTheBitacora |
func | Every route that changes something writes the bitácora: who, the route, what it was on and how it ended, whatever the answer. |
TestAprobaciones |
func | An agent asks to roll back; nothing happens until an administrator approves; then the platform rolls back in their name, the request says what came of it, and the bitácora has the platform's action with who asked and who approved. |
TestMotivoEnElIdiomaDeQuienLee |
func | An agent's reason reaches the reader in their language: translated the first time, kept for the next reader (no second call), with the original beside it. |
TestSenalesDeVida |
func | Señales de vida: received only where the platform receives them, at most one an hour per installation, the team's own apart; the operators see what this installation would send and turn it off; the public number waits for more than 25 installations outside the team. |
TestComentariosAPI |
func | A person comments on a delivered encargo and on the agent's cargo without sending anything back; a secret is refused; the agent's answer is in the bell for that person until they have seen it, and only for them. |
internal/api/solo_abrir_test.go¶
201 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestOpenPullOnly |
func | "Just open the pull request": it opens the branch's pull request with the merge action's title and body, and merges nothing; one already open is answered with its link; the default branch has none to open. |
internal/api/uso_test.go¶
221 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestUsoAPI |
func | The interface's use: only route patterns from the list and actions from the closed list come in, nothing says who, off keeps nothing, and only the platform's administrators read it. |
TestUsoListsMatchTheUI |
func | The pages and actions the server accepts are the interface's: the routes of web/src/main.tsx, and the lists of web/src/uso.ts. |
internal/api/vigia_test.go¶
98 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestVigiaFindingsArePeoplesToDecide |
func | A person decides each finding of the lookout: an encargo with the evidence, a Ruta entry (a to-do, or a note for a fact), or set aside; once, and only an administrator of the platform. |
internal/api/visits_test.go¶
39 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestVisitPeriod |
func | A Visits request's window: calendar days run midnight to midnight in the visits' time zone (today until now), rolling ranges end now. |
internal/arreglos¶
Package arreglos runs an app's declared fixes (rendimiento.yaml's fixes:): a command that regenerates files, such as a lockfile, on a branch, in a pod of the build namespace.
internal/arreglos/arreglos.go¶
410 lines
| Name | Kind | Summary |
|---|---|---|
Executor |
interface | Executor runs a fix's pod (pipeline.KubeExecutor; faked in tests). |
Repos |
interface | Repos is what a fix reads and writes on the app's forja (GitHub, GitLab or Bitbucket: the platform's Repos sends each call to its own). |
Store |
interface | Store keeps the fix runs. |
Service |
struct | Service runs declared fixes. |
Request |
struct | Request is a fix to run. |
Result |
struct | Result is how a fix ran. |
(*Service) Declared |
method | Declared are the fixes in the default branch's rendimiento.yaml: the only ones that run, whatever the branch being fixed says. |
(*Service) Run |
method | Run runs one declared fix on a branch: it resolves its recipe (the image from the folder's version files), runs it in a pod, keeps only the files it may write, records it, and commits them when asked. |
CommitMessage |
func | CommitMessage is the message of a fix's commit: what it regenerated, which fix, who asked, and the person as a co-author. |
compactStrings |
func | |
Keep |
func | Keep is what of a fix's output comes back: the changed files under its folder that match its patterns exactly, up to max bytes in all. |
Writes |
func | Writes reports whether a fix may write a file (by its path from the repo root): under the fix's folder, matching one of its patterns, where * and ? stay within a folder and ** spans any number of them. |
matchGlob |
func | |
versionFile |
func | |
imageFromText |
func | |
short |
func | |
capped |
struct | capped writes at most n bytes, then a note that the rest was cut. |
(*capped) Write |
method |
internal/arreglos/firmas.go¶
156 lines
| Name | Kind | Summary |
|---|---|---|
Stale |
struct | Stale is a failed step's log that says a lockfile no longer matches: the recipe that regenerates it, its file, and the line that said so. |
Signature |
func | Signature reads a failed step's log for a stale lockfile: the first known message, or false. |
Contains |
func | Contains reports whether a fix's folder holds dir (both relative to the repo root): the same folder, or one above it. |
Covering |
func | Covering is the declared fix that regenerates what stale names in dir: of the same recipe, or of the app's own that writes that file, in dir or the nearest folder above it. |
Found |
struct | Found is a failed step whose log says a lockfile is stale, and the step's folder. |
Match |
struct | Match is a failed step and the declared fix that covers it. |
Covered |
func | Covered is, for each failed step, the declared fix that covers it (see Covering), in the steps' order; steps no fix covers are left out. |
deeper |
func | deeper reports whether folder a is deeper than b, and, at the same depth, whether step a comes first: the same answer in any order. |
depth |
func | |
Best |
func | Best is the one failed step a run's page offers to fix, whatever the steps' order: of the steps a declared fix covers, the one with the deepest fix (then the deepest folder); when no fix covers any, ok is false and step is the one in the deepest folder, for the fix to declare. |
internal/arreglos/recetas.go¶
280 lines
| Name | Kind | Summary |
|---|---|---|
Plan |
struct | Plan is what a fix runs, with its recipe resolved. |
Read |
type | Read reads a file of the branch, with the caller's uncommitted changes, by its path from the repo root; false when there is none. |
recipe |
struct | recipe is a known fix: its command (given the version files found), the files it may write, and the image's language. |
RecipeWrites |
func | RecipeWrites are the files a recipe may write, relative to its path. |
corepack |
func | corepack enables the package manager the folder names (packageManager), installing corepack first where Node no longer brings it. |
packageManager |
func | packageManager is the version package.json's packageManager names for tool ("[email protected]+sha…" → 9.1.0), or "". |
Resolve |
func | Resolve turns a declared fix into what runs: a recipe's command, files and image (its version from the folder's files, read through read), or the fix's own. |
dockerfileVersion |
func | dockerfileVersion is the version of image (node, golang, python) in the folder's Dockerfile's first FROM of it, or "". |
nodeVersion |
func | nodeVersion is the Node major the folder uses: .nvmrc, .node-version, package.json's engines.node, its Dockerfile's FROM node, else DefaultNode. |
goVersion |
func | goVersion is the Go the folder's go.mod asks for (its toolchain line, else its go line as major.minor), its Dockerfile's FROM golang, else DefaultGo. |
pythonVersion |
func | pythonVersion is the folder's Python (major.minor): .python-version, pyproject.toml's requires-python, its Dockerfile's FROM python, else DefaultPython. |
internal/arreglos/arreglos_test.go¶
333 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestResolve |
func | Each recipe's command, files and image, with the version from the folder's own files, or the default (and it says which). |
TestSignature |
func | Real log lines of stale lockfiles are recognized, and ordinary failures are not. |
TestCovering |
func | The fix that covers a failed step's folder: its own recipe (or a fix of the app's own that writes the file), in the folder or above it, the nearest first. |
TestBest |
func | The run page's offer looks at every failed step, in any order: a stale web/package-lock.json fails both web-ui:task (in web, which lockfile-web covers) and web:build (in ., which no fix covers), and the page offers lockfile-web either way; without a fix that covers any, it offers to declare one for the deepest folder. |
TestKeep |
func | Only the files under the fix's folder that match its patterns come back; the rest is ignored and listed; and there is a cap on their size. |
TestRun |
func | A fix runs from the default branch's definition (never the branch's), on the branch's commit with the pending files, and its files are committed. |
internal/bitbucket¶
Package bitbucket is Bitbucket Cloud's forja, through its REST API 2.0 (Bitbucket Data Center comes later).
internal/bitbucket/api.go¶
391 lines
| Name | Kind | Summary |
|---|---|---|
APIError |
struct | APIError is Bitbucket answering with a status of 300 or more. |
(*APIError) Error |
method | |
(*APIError) Is |
method | Is makes errors.Is find forja.ErrNotFound in a 404, and forja.ErrConflict in a 409. |
(*APIError) Says |
method | Says is the sentence Bitbucket gave for refusing ("" when none): its error's message (and detail), or OAuth's error_description. |
(*Forja) api |
method | api calls Bitbucket's API 2.0 as connection c: path starts with "/" and is relative to /2.0. |
(*Forja) apiRaw |
method | apiRaw is api on a whole address (a page's "next", an archive). |
form |
struct | form is a body sent as multipart/form-data (Bitbucket's /src takes files that way). |
(*Forja) call |
method | call is one request with a bearer token; out, when not nil, is a *[]byte for the raw answer, an *http.Header for the answer's headers (a new commit's Location), or anything JSON decodes into. |
(*Forja) AuthorizeURLFor |
method | AuthorizeURLFor is where a person authorizes the connection's consumer on Bitbucket: it sends them back to the consumer's callback URL with state and a code. |
Tokens |
struct | Tokens is Bitbucket's answer to /site/oauth2/access_token. |
(Tokens) expires |
method | expires is when the access token stops working (two hours when Bitbucket does not say). |
(*Forja) oauthToken |
method | oauthToken posts a grant to Bitbucket's token endpoint, with the consumer's key and secret as basic auth. |
User |
struct | User is a Bitbucket account: its account id (or uuid) never changes, its nickname may. |
(*User) ID |
method | ID is the account's id that never changes. |
(*User) Name |
method | Name is the account's name as rendimiento writes it: its nickname (or username), with what a login cannot have as dashes. |
(*Forja) Exchange |
method | Exchange trades a code for the account that authorized it and its tokens. |
(*Forja) Authorized |
method | Authorized keeps the tokens a person's authorization gave the connection: rendimiento acts with them from now on. |
(*Forja) token |
method | token is a valid access token for the connection: the kept one while it has five minutes left, else a refreshed one, which is kept each time (with the refresh token Bitbucket answers). |
(*Forja) first |
method | first is the oldest connection: the one forja.SignIn signs in with. |
(*Forja) AuthorizeURL |
method | AuthorizeURL is where "Sign in with Bitbucket" sends people, on the oldest connection (the API signs in on the one a person picks: AuthorizeURLFor). |
(*Forja) SignIn |
method | SignIn trades a sign-in code of the oldest connection for the account's name in rendimiento's words (Login). |
Login |
func | Login is how a Bitbucket account not linked to anyone is named in rendimiento: its nickname at bitbucket.org ([email protected]). |
internal/bitbucket/bitbucket.go¶
255 lines
| Name | Kind | Summary |
|---|---|---|
Secret |
struct | Secret is what a connection keeps out of the database: the OAuth consumer's secret, the webhooks' secret, and the tokens rendimiento acts with. |
Keys |
interface | Keys keeps each connection's Secret: in a Kubernetes Secret, or sealed in the Caja (see api.BitbucketSecrets and secretos.Bitbucket). |
Connection |
struct | Connection is one workspace rendimiento works with (a row of bitbucket_connections, store.BitbucketConnection). |
Connections |
interface | Connections is where the connections are listed (the store): a connection that is not there is ErrNotConnected. |
TokenLocker |
interface | TokenLocker, when the Connections has it (the store's does, with a Postgres advisory lock), holds a connection's token refresh for one process at a time: the refresh token changes on each use, so two refreshing at once would clash. |
Forja |
struct | Forja is Bitbucket Cloud's forja, for every workspace connected. |
(*Forja) Name |
method | Name is the forja's short name. |
(*Forja) Ready |
method | Ready is nil once a workspace is connected. |
(*Forja) Allows |
method | Allows: a workspace is connected on purpose, and only its repositories that an administrator made apps of are built, so every account counts. |
(*Forja) client |
method | client is the HTTP client (30 seconds at most per request by default). |
(*Forja) apiURL |
method | |
(*Forja) siteURL |
method | |
NormalizeWorkspace |
func | NormalizeWorkspace checks a workspace's slug and writes it one way: the person may paste its address (https://bitbucket.org/tienda/) too. |
(*Forja) connection |
method | connection is a connection and its secret. |
(*Forja) secret |
method | secret is the connection's secret, cached; fresh reads it again. |
(*Forja) remember |
method | remember caches a connection's secret. |
(*Forja) cache |
method | cache is remember with f.mu already held. |
(*Forja) Forget |
method | Forget drops a connection's cached secret (it was connected again or removed). |
fullName |
func | fullName is the repository's workspace/slug: repo without bitbucket.org/. |
RepoOf |
func | RepoOf is an app's Repo for a repository of Bitbucket (workspace/slug). |
InWorkspace |
func | InWorkspace says whether repo is one of the connection's workspace. |
(*Forja) CloneURL |
method | CloneURL is where build pods clone a Bitbucket app's repository from. |
internal/bitbucket/renovate.go¶
38 lines
| Name | Kind | Summary |
|---|---|---|
(*Forja) Renovate |
method | Renovate is what a Renovate run on the workspace's repositories needs: the API (without its /2.0, which Renovate adds), a token that lasts at least last (refreshed first when the kept one would not), and each repository's full name (workspace/repo). |
(*Forja) tokenLasting |
method | tokenLasting is a token with at least last left: the kept one, or a refreshed one. |
internal/bitbucket/repos.go¶
933 lines
| Name | Kind | Summary |
|---|---|---|
repoAPI |
func | repoAPI is the API path of a repository: /repositories/workspace/slug. |
(*Forja) in |
method | in calls the API on a repository, as the connection installation. |
escapePath |
func | escapePath escapes a file's path segment by segment. |
page |
struct | page is one page of a Bitbucket list. |
list |
func | list reads up to pages pages of a list, following each page's next; more is true when Bitbucket had more. |
listIn |
func | listIn is list on a repository of the connection installation. |
(*Forja) FileAt |
method | FileAt reads one file of repo at ref (a commit or a branch). |
(*Forja) RepoFS |
method | RepoFS is repo's tree at ref: its archive in one request, or, when Bitbucket does not give it, read file by file through the API. |
(*Forja) walk |
method | walk reads a tree through /src: its listing, then each file. |
untar |
func | untar reads a repository's archive into a tree, without its first folder (workspace-repo-sha/). |
(*Forja) ChangedFiles |
method | ChangedFiles lists the files that differ between base and head, from their merge base (Bitbucket's diffstat of head..base); complete is false when the list was cut. |
bbBranch |
struct | bbBranch is a branch as Bitbucket writes it. |
(*Forja) BranchSHA |
method | BranchSHA is the commit a branch points at. |
(*Forja) Branches |
method | Branches lists the repository's branches (the first 100). |
bbCommit |
struct | bbCommit is a commit as Bitbucket writes it. |
(*Forja) commit |
method | |
(*Forja) CommitSubject |
method | CommitSubject is the first line of a commit's message. |
(*Forja) MergeBase |
method | MergeBase is the best common ancestor of two commits or branches, with its commit time. |
(*Forja) FirstParent |
method | FirstParent is a commit's first parent ("" for the first commit). |
(*Forja) CloneToken |
method | CloneToken is what build pods clone with: Bitbucket takes an OAuth token as the password of the user "x-token-auth" (the clone script uses a token with a ":" as user:password). |
StatusState |
func | StatusState is the build status a check is shown as on Bitbucket, and its description. |
statusKey |
func | statusKey is the key a check's build status is kept under: Bitbucket keeps one per commit and key, so writing it again updates it. |
(*Forja) postStatus |
method | postStatus writes a commit's build status. |
(*Forja) CreateCheck |
method | CreateCheck writes the commit's build status under the check's name. |
(*Forja) UpdateCheck |
method | UpdateCheck writes the status again under the same key: the check must say its name and commit (the platform does). |
bbPR |
struct | bbPR is a pull request as Bitbucket writes it. |
(bbPR) change |
method | change is a pull request in the forja's words. |
(*Forja) fullHeads |
method | fullHeads writes the whole commit of each open pull request's head: Bitbucket lists them cut to 12 characters, and runs are by the whole one. |
(*Forja) prs |
method | prs lists pull requests with the query given, up to pages of 50. |
(*Forja) RecentPullRequests |
method | RecentPullRequests lists the repository's 100 most recently updated pull requests, open and closed. |
(*Forja) OpenPulls |
method | OpenPulls lists the open pull requests (up to 100), the most recently updated first. |
(*Forja) openFrom |
method | openFrom lists the open pull requests from a branch. |
(*Forja) Pull |
method | Pull is one pull request, with whether it can be merged: Bitbucket does not say it, so its diffstat is read; a file in "merge conflict" is a conflict ("dirty"), and a draft waits ("blocked"). |
(*Forja) MergePull |
method | MergePull merges a pull request while its head is still sha: Bitbucket's merge takes no commit, so the head is read first, and a head that moved is forja.ErrConflict. |
(*Forja) newPR |
method | newPR opens a pull request from branch into base. |
(*Forja) CreatePull |
method | CreatePull opens a pull request from a branch into base and returns its number; when the branch already has one open, that one's. |
(*Forja) Comment |
method | Comment writes a comment on a pull request and returns its id; with id set, it edits that comment instead. |
(*Forja) ClosePull |
method | ClosePull declines a pull request. |
(*Forja) DeleteBranch |
method | DeleteBranch deletes a branch; one already gone is not an error. |
(*Forja) OpenPR |
method | OpenPR commits files on a new branch off base in one commit (Bitbucket's /src, as a form) and opens a pull request (or finds the one open). |
(*Forja) Files |
method | Files is repo's text files at ref, each up to maxFile bytes (read as RepoFS reads them). |
(*Forja) CreateBranch |
method | CreateBranch makes branch start at sha. |
(*Forja) CommitFiles |
method | CommitFiles commits files and removals on branch in one commit (Bitbucket's /src, as a form: a path with no content is removed), and returns the new commit. |
(*Forja) CommitMerge |
method | CommitMerge commits files and removals on branch (whose head must still be head) as a merge of other into it, with head and other as parents. |
(*Forja) writeSrc |
method | writeSrc writes one commit on branch through /src, on parents (none: on branch's head). |
(*Forja) executable |
method | executable reports whether a file is executable at the first of refs that has it (false when Bitbucket does not say). |
Repository |
struct | Repository is a repository of the workspace the wizard can make an app of. |
(*Forja) Repositories |
method | Repositories lists the workspace's repositories the connection administers (where it may add a webhook), the most recently updated first, up to 300. |
(*Forja) EnsureHook |
method | EnsureHook adds the repository's webhook to rendimiento (pushes and pull requests, signed with the connection's secret), or brings the one there up to date: rendimiento does it for the person when an app is created. |
internal/bitbucket/webhook.go¶
185 lines
| Name | Kind | Summary |
|---|---|---|
Sign |
func | Sign is a delivery's signature with a webhook's secret, as Bitbucket writes it in X-Hub-Signature: sha256= |
(*Forja) ParseWebhook |
method | ParseWebhook checks a delivery's X-Hub-Signature against each connection's webhook secret (in constant time) and reads the events rendimiento acts on: a push to a branch (repo:push) and a pull request opened, merged or declined (pullrequest:created, :fulfilled, :rejected). |
(*Forja) fullHead |
method | fullHead writes the whole commit of a pull request's head: Bitbucket's webhook cuts it to 12 characters, and the libreta notes a merge with the whole one (as runs have it). |
(*Forja) deliveredBy |
method | deliveredBy is the connection whose webhook secret signed a delivery. |
bbRef |
struct | bbRef is a branch (or tag) in a push. |
parseWebhook |
func | parseWebhook reads a delivery of connection c, already checked. |
internal/bitbucket/bitbucket_test.go¶
471 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestWebhookSignature |
func | |
TestWebhookEvents |
func | |
TestStatusState |
func | |
TestStatusesAndPulls |
func | |
TestTokenRefresh |
func | An access token about to expire is refreshed, and the new tokens are kept each time. |
TestSignIn |
func | |
TestNormalizeWorkspace |
func | |
TestSays |
func |
internal/bitbucket/escribir_test.go¶
146 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestWritingOnABranch |
func | |
TestRenovateAccess |
func | |
TestMergedHeadIsWhole |
func | |
TestPushOfSeveralBranches |
func |
internal/bitbucket/mezcla_test.go¶
377 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCommitMergeOnBitbucket |
func | Bitbucket's /src takes two parents: the merge commit has the branch's head and the default branch's as parents, and the resolved tree. |
TestCommitMergeWithOneParent |
func | A Bitbucket that writes the commit with one parent: the resolution is there, but it is no merge, and CommitMerge says so. |
TestCommitFilesAnswersItsCommit |
func | The commit CommitFiles answers is the one it wrote (Bitbucket's Location), not the branch's head after someone else's push; a script it changes stays executable. |
internal/caminos¶
Package caminos builds an app's recent history as the Caminos tab draws it: the default branch is the camino real, every other branch is a vereda that leaves it at the commit it was branched from (or from its parent branch, for a stacked pull request) and comes back where its pull request was merged, with each run as a stop along the way.
internal/caminos/caminos.go¶
184 lines
| Name | Kind | Summary |
|---|---|---|
Run |
struct | Run is one build, as a stop on the road. |
PullRequest |
struct | PullRequest is what the history needs of a pull request. |
Fork |
struct | Fork is the commit a branch was started from. |
Source |
interface | Source answers what only GitHub knows. |
Branch |
struct | Branch is one vereda. |
History |
struct | History is everything the tab draws. |
Build |
func | Build makes the history of runs (any order) of a repository whose default branch is def. |
last |
func |
internal/caminos/caminos_test.go¶
126 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestBuild |
func | |
TestBuildWithoutGitHub |
func | |
TestBuildCapsBranches |
func |
internal/catalog¶
Package catalog lists the services apps can integrate with: what each one is, where it comes from (a rendimiento app, ArgoCD, Helm, kubectl), what it exposes (addresses, ports, public URLs, LAN IPs), how to call it from rendimiento.yaml, and which workloads already do.
internal/catalog/catalog.go¶
746 lines
| Name | Kind | Summary |
|---|---|---|
Group |
type | Group is which tab a service appears under on the Services page. |
Origin |
struct | Origin says where a service comes from. |
Image |
struct | Image is a container image behind a service. |
Port |
struct | Port is one port a Service exposes. |
Consumer |
struct | Consumer is a workload whose environment points at the service. |
Entry |
struct | Entry is one service in the catalog: what it is, where it comes from, what it exposes, how to connect, and who calls it. |
Catalog |
struct | Catalog is every service in the cluster, grouped and sorted for the Services page. |
Builder |
struct | Builder assembles the catalog from the cluster and keeps it: one look is eight lists across the whole cluster, slow when the API server is busy (an update rolling out), and every page that asks must not wait for it. |
(*Builder) Get |
method | Get returns the catalog it has, building a new one behind it when it is older than TTL. |
snapshot |
struct | |
(*Builder) build |
method | build makes the catalog from one look at the cluster: every Service (rendimiento's apps, other apps, infrastructure), where it comes from, its addresses inside and outside the cluster, its pods and images, and which workloads call it (found in their environment variables). |
assemble |
func | assemble builds the catalog from a snapshot of the cluster. |
appService |
struct | |
groupRank |
func | groupRank orders the groups: apps, then other, then infrastructure. |
appOrigin |
func | appOrigin says where an app's service comes from: built by rendimiento from its repository (with a link to the folder), or a ready-made image. |
foreignOrigin |
func | foreignOrigin works out who deployed something rendimiento does not manage. |
metav1Object |
interface | |
firstNonEmpty |
func | firstNonEmpty is the first of a that is not "". |
guessProtocol |
func | guessProtocol names the protocol from the port name or well-known number. |
lanAddress |
func | lanAddress is where a LoadBalancer Service answers on the local network (ip:port, empty until the load balancer assigns an IP), and a link to open when the protocol is a web one. |
address |
func | address is how to reach a service from inside the cluster, as a URL for protocols that have one (no port when it is the protocol's usual one), else host:port. |
suggestEnv |
func | suggestEnv is the environment variable an app would usually read the service's address from (DATABASE_URL, REDIS_URL, ...). |
snippet |
func | snippet is the rendimiento.yaml fragment for a service that calls this one. |
withCredentials |
func | withCredentials shows where the user, password and database go in the address, as placeholders. |
publicURLs |
func | publicURLs are the https:// addresses ingresses publish the service on. |
selected |
func | selected are the running pods the Service sends traffic to. |
podReady |
func | podReady reports whether Kubernetes counts the pod as ready. |
podImages |
func | podImages are the images the pods run, each once. |
imageLink |
func | imageLink points at an image's public page (Docker Hub, Quay, GitHub). |
categorize |
func | categorize guesses what a service is (database, cache, storage, monitoring, ...) from its protocol, name and images. |
imageRepo |
func | imageRepo drops the registry host, tag and digest: what the image is ("dustynv/ollama"), not where it is stored ("registry.example.lan:5000"). |
workload |
struct | |
collectWorkloads |
func | collectWorkloads lists Deployments, StatefulSets and CronJobs with the environment of all their containers, to find which call which service. |
consumers |
func | consumers finds workloads whose plain environment values point at svc: by its cluster DNS name from anywhere, by its short name from the same namespace, or by its LAN address. |
internal/catalog/builder_test.go¶
154 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestBuilderServesTheOldCatalogWhileItBuildsANewOne |
func | Looks at the catalog while a new one is slow to build do not wait for it, nor queue up behind it: they all get the one there is, and only one new one is built. |
TestBuilderWaitsOnlySoLongForTheFirstCatalog |
func | A first catalog is waited for only Wait: then the look is told it is still being read, and the next look, once it is built, has it. |
TestBuilderGivesUpOnABuild |
func | A build that never ends gives up after Build, and the next look tries again. |
internal/catalog/catalog_test.go¶
189 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestAssemble |
func | |
TestImageLink |
func | |
TestCategorize |
func | |
TestLANAddress |
func |
internal/controller¶
Package controller reconciles App objects into running workloads: the GitOps half of rendimiento.
internal/controller/addon_controller.go¶
550 lines
| Name | Kind | Summary |
|---|---|---|
AddonReconciler |
struct | |
(*AddonReconciler) Reconcile |
method | Reconcile renders an add-on, previews it, applies it (with hooks, on install and upgrade) unless a gate stops it, prunes what left the source, and records the result. |
(*AddonReconciler) prepare |
method | prepare sets the namespace of namespaced objects that have none and labels every object with the add-on's name. |
(*AddonReconciler) prepareOne |
method | prepareOne namespaces and labels one object. |
applyRank |
func | applyRank orders CRDs and namespaces before the objects that need them. |
(*AddonReconciler) preview |
method | preview dry-runs every object and records what a sync would change. |
normalize |
func | normalize renders an object without the fields that always differ between a live object and a dry run, or that rendimiento adds itself. |
unifiedDiff |
func | unifiedDiff shows how an object in the cluster differs from what the add-on wants (for manual sync), cut at 3000 characters. |
(*AddonReconciler) applyAll |
method | applyAll server-side applies the objects in order, waiting for CRDs to be established before the objects that use them. |
(*AddonReconciler) waitCRDs |
method | waitCRDs waits up to 30 seconds for the CRDs just applied to be ready, before applying objects of those kinds. |
established |
func | established reports whether a CRD is ready to be used. |
(*AddonReconciler) prune |
method | prune deletes objects that were in the previous inventory but are no longer rendered, except kinds that must never be deleted. |
(*AddonReconciler) deleteRef |
method | deleteRef deletes one object an add-on made; one already gone (or whose kind no longer exists) is fine. |
(*AddonReconciler) finalize |
method | finalize runs when an Addon is deleted: by default everything it installed keeps running; with the uninstall annotation it is removed (except kinds that must never be deleted). |
(*AddonReconciler) saveStatus |
method | saveStatus writes the add-on's status. |
ref |
func | ref is how an add-on remembers an object it made. |
refKey |
func | refKey identifies an object regardless of API version. |
refs |
func | refs is ref of each object, sorted. |
fromUnstructured |
func | fromUnstructured converts an object read without its Go type into one. |
(*AddonReconciler) SetupWithManager |
method | SetupWithManager registers the controller; it reacts to spec and annotation changes, and resyncs periodically. |
internal/controller/addon_hooks.go¶
178 lines
| Name | Kind | Summary |
|---|---|---|
lifecycle |
func | lifecycle returns what this sync is in Helm's terms: "install" for the first sync of a new add-on, "upgrade" when the chart, version, values or release name changed since the last apply, and "" otherwise (an adoption of something already installed, or a resync with nothing new). |
(*AddonReconciler) runHooks |
method | runHooks runs, in weight order, every hook for event (e.g. |
(*AddonReconciler) hookDone |
method | hookDone records a hook's outcome and applies its delete policy. |
(*AddonReconciler) waitHook |
method | waitHook waits for a Job to complete or a Pod to succeed; other kinds (a ConfigMap or ServiceAccount a hook Job uses) are done once created. |
(*AddonReconciler) deleteAndWait |
method | deleteAndWait removes an object (and a Job's pods) and waits until it is gone. |
hookInfo |
func | hookInfo is what the add-on's status shows of its Helm hooks. |
countHooks |
func | countHooks is how many hooks run on event (install, upgrade, delete). |
internal/controller/app_controller.go¶
755 lines
| Name | Kind | Summary |
|---|---|---|
AppReconciler |
struct | AppReconciler turns App objects into running workloads, DNS records and status. |
(*AppReconciler) Reconcile |
method | Reconcile brings one app's objects in line with its App object, or cleans up after it is deleted. |
(*AppReconciler) sync |
method | sync makes the cluster match one App: it renders the app's objects from its services, jobs, needs and released images (render.Render), applies them (the namespace first, then its secrets, then the rest, ingresses last), moves traffic over from an app it is migrating, deletes objects the app no longer needs, and fills st with each service's health. |
orgOf |
func | orgOf is the address of the app's organization, from its App object's label; an App without one (made before organizations reached the cluster) is the platform's, until the platform writes it again. |
(*AppReconciler) syncNetworkPolicies |
method | syncNetworkPolicies applies the app's network policies (the boundary between organizations, render.OrgNetwork) in a namespace rendimiento owns, and deletes those of its own it no longer renders: all of them when the boundary is off, and in a shared namespace, which is someone else's. |
(*AppReconciler) checkOwnership |
method | checkOwnership refuses to take over a namespace or hostname that belongs to something else, e.g. |
(*AppReconciler) migrate |
method | migrate runs one step of an adoption: new workloads are already applied; once they are ready, traffic moves from the legacy ingresses to ours and the old workloads behind them are removed. |
selects |
func | selects reports whether labels carry every key and value of selector. |
(*AppReconciler) keepStorageClass |
method | keepStorageClass leaves a volume that exists in the storage class it was made with: a claim's class cannot change, and a new STORAGE_CLASS is for new volumes only. |
(*AppReconciler) apply |
method | apply writes one object with server-side apply as rendimiento, owned by the App (so it goes when the App goes): whatever someone changed by hand in the fields rendimiento sets is put back. |
(*AppReconciler) applyIngresses |
method | applyIngresses applies ingresses in several passes. |
(*AppReconciler) takeover |
method | takeover replaces, once, a same-named object that rendimiento does not manage yet (e.g. |
(*AppReconciler) prune |
method | prune deletes workloads, services and ingresses of this app that are no longer in the spec. |
appendIfStale |
func | appendIfStale adds o to stale when the rendered objects (want, by type and name) no longer include it. |
(*AppReconciler) lanURL |
method | lanURL is where the service's lan: Service answers on the local network, from the address the load balancer assigned ("" until then). |
(*AppReconciler) certReady |
method | certReady reports whether cert-manager has issued the Certificate ns/name. |
(*AppReconciler) finalize |
method | finalize runs when an App is deleted, before Kubernetes removes it: it deletes the app's DNS records (unless the app is only being disconnected, which leaves everything running), then lets the deletion go on. |
(*AppReconciler) crashLooping |
method | crashLooping reports a pod of the deployment stuck restarting, e.g. |
deploymentCondition |
func | deploymentCondition is the Deployment's condition of type t, or nil. |
(*AppReconciler) SetupWithManager |
method | SetupWithManager registers the controller; changes to the objects an app owns trigger a reconcile (self-healing). |
internal/controller/needs.go¶
139 lines
| Name | Kind | Summary |
|---|---|---|
(*AppReconciler) ensureNeedSecrets |
method | ensureNeedSecrets creates the credentials for the app's database and cache the first time they are needed. |
(*AppReconciler) ensureSecret |
method | ensureSecret creates a secret with a new random password the first time; once it exists it is never changed, so the database keeps working. |
(*AppReconciler) serviceURLs |
method | serviceURLs looks up the services the app's services need and returns the address to inject for each: its app port (not the port-80 alias), by short name within the app's namespace, by cluster DNS name otherwise. |
isOwnService |
func | isOwnService reports whether name is a service of this app. |
address |
func | address is the URL of a service inside the cluster (no port for 80 or 443). |
internal/controller/addon_controller_test.go¶
242 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestAddonLifecycle |
func |
internal/controller/addon_hooks_test.go¶
145 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestAddonHooks |
func |
internal/controller/addon_predicate_test.go¶
33 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPeopleAnnotationsChanged |
func | The controller wakes for a person's annotations, not for its own record of the pre hooks it ran. |
internal/controller/almacen_test.go¶
39 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestVolumeKeepsItsStorageClass |
func | A volume that exists keeps the storage class it was made with when STORAGE_CLASS changes (a claim's class cannot change); a new one takes the new class. |
internal/controller/app_controller_test.go¶
919 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestAppLifecycle |
func | |
TestRefusesForeignNamespaceAndHost |
func | |
TestAdoptExistingDeployment |
func | Migration of an app deployed another way (ArgoCD): the namespace and its secret are kept, new pods start next to the old ones, and traffic moves only once they are ready. |
TestAdoptStillBlocksOtherNamespaces |
func | Adoption only covers the app's own namespace: a host served elsewhere still blocks. |
TestAdoptInPlace |
func | In-place adoption (simplerfc): same-named Deployment, Service and Ingress deployed by ArgoCD are taken over without being recreated; the existing volume claim is reused and nothing the old owner set survives. |
TestJobsAdoptAndPrune |
func | Scheduled jobs: an existing CronJob (from ArgoCD) is taken over in place, and a job removed from rendimiento.yaml is pruned. |
TestAdoptRenamedIngressWithAliases |
func | stockpulse's ingress: a differently named ingress kept by name, several hosts on two certificates, extra nginx settings; aliases get DNS and count for conflicts. |
TestAdoptWithPathRoutes |
func | wellness: /api moves from the website's ingress to the API's ingress; both legacy ingresses are taken over in place under their existing names. |
TestDisconnectKeepsDNS |
func | Disconnecting keeps the app's DNS records: its workloads keep serving. |
TestStuckRolloutIsNotHealthy |
func | A rollout where the new pod crash-loops while an old pod keeps serving must not be reported Healthy (wellness-api with a broken image). |
TestSharedNamespace |
func | jobsentry: the namespace belongs to ArgoCD (linguistic-ai stays there); rendimiento runs its services in it without touching the namespace. |
TestAppNeeds |
func | |
TestAppLANURL |
func | |
TestAppObserve |
func | The app-wide observe goes through the API server (the CRD must keep it) and reaches the rendered pods. |
internal/controller/env_test.go¶
104 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestMain |
func |
internal/controller/frontera_test.go¶
141 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestOrgBoundaryOn |
func | With the boundary on, each namespace rendimiento owns carries its organization and a policy that lets in only its own; an App without the label is the platform's; a shared namespace is left alone. |
TestOrgBoundaryOff |
func | With the boundary off (the default), the namespace still carries its organization, and a policy rendimiento made before is removed; anyone else's stays. |
internal/destino¶
Package destino is where an app's releases run.
internal/destino/destino.go¶
94 lines
| Name | Kind | Summary |
|---|---|---|
Estado |
type | Estado is where a release's rollout stands. |
Destino |
interface | Destino runs an app's releases somewhere. |
Situacion |
struct | Situacion is an app as it runs now: the status its page shows, and whether it is suspended. |
Recurso |
struct | Recurso is one part of what runs for an app, in the tree on its page. |
Impacto |
struct | Impacto describes what removing an app would destroy. |
internal/destino/kubernetes.go¶
138 lines
| Name | Kind | Summary |
|---|---|---|
Kubernetes |
struct | Kubernetes runs releases in the cluster: each app is an App object, which the controller turns into its namespace, workloads, ingresses and needs. |
(Kubernetes) org |
method | org is the address of the app's organization. |
(Kubernetes) Nombre |
method | Nombre is "kubernetes". |
(Kubernetes) Crear |
method | Crear writes the app's App object, labeled with its id and its organization. |
(Kubernetes) Aplicar |
method | Aplicar writes the release into the App object; the controller does the rest. |
(Kubernetes) Estado |
method | Estado reads the App object: healthy once the controller reports the release Healthy, failed when it reports it Degraded or in Error. |
(Kubernetes) Quitar |
method | Quitar deletes the App object; the controller then removes DNS and, through owner references, the namespace. |
internal/destino/kubernetes_paginas.go¶
301 lines
| Name | Kind | Summary |
|---|---|---|
(Kubernetes) Situacion |
method | Situacion reads the App object's status, and whether it is suspended. |
(Kubernetes) Recursos |
method | Recursos is the app's resource tree: per service, its Deployment and pods, Service, Ingress and volume, each with a health (Healthy, Progressing, Degraded or Missing), rolled up to the app. |
deploymentHealth |
func | deploymentHealth: Degraded past its progress deadline, Healthy once every replica is updated and ready. |
podNode |
func | podNode is a pod in the resource tree: Healthy when ready, Degraded when crash-looping or unable to pull its image, with its restarts and node. |
ptrOr |
func | |
(Kubernetes) Reiniciar |
method | Reiniciar restarts the app's Deployments (a new annotation on their pod template), so new secret values are picked up. |
(Kubernetes) Impacto |
method | Impacto lists what deleting the app would remove: its namespace, and the volumes and secrets in it (only those rendimiento owns, in a shared namespace). |
(Kubernetes) Desconectar |
method | Desconectar stops managing the app but leaves everything running: the namespace and its objects lose rendimiento's ownership (so deleting the App garbage-collects nothing) and labels, DNS records stay, and the App object is deleted. |
release |
func | release removes owner references to the App and rendimiento's top-level labels from one object. |
internal/destino/kubernetes_secretos.go¶
89 lines
| Name | Kind | Summary |
|---|---|---|
(Kubernetes) secreto |
method | secreto is the Secret named in the app's namespace, once the namespace exists and is the app's (ErrSinLugar otherwise). |
(Kubernetes) LlavesSecreto |
method | LlavesSecreto lists the keys of the Secret in the app's namespace. |
(Kubernetes) GuardarSecreto |
method | GuardarSecreto writes the values straight into the Secret in the app's namespace; they are never stored in git or in Postgres. |
internal/destino/kubernetes_tareas.go¶
287 lines
| Name | Kind | Summary |
|---|---|---|
taskJob |
func | taskJob builds the Job for a post-deploy task (or one run en seco from a branch, stage spec.StageDryRun, never with service:). |
(Kubernetes) Tarea |
method | Tarea runs one deploy task as a Job in the app's namespace and waits for it, keeping its log. |
(Kubernetes) waitTaskPod |
method | waitTaskPod returns the name of a Job's pod once it has started (or finished), or "" if it never does. |
jobFailed |
func | jobFailed reports whether Kubernetes marked the task's Job failed. |
jobFailure |
func | jobFailure says why the Job failed ("timed out", or its reason). |
lastLines |
func | lastLines is the last n lines of a log on one line, to quote in a message. |
lockedWriter |
struct | |
(*lockedWriter) Write |
method | Write appends b under the lock (the log stream and the reader share the buffer). |
internal/destino/local.go¶
925 lines
| Name | Kind | Summary |
|---|---|---|
Caja |
interface | Caja keeps sealed values by name (*secretos.Caja). |
Local |
struct | Local runs releases on this computer, as containers of its engine: each service of a release is one container (its first replica), on the app's own network, published on 127.0.0.1 and reached through the Proxy at |
estadoLocal |
struct | |
(*Local) Nombre |
method | Nombre is "local". |
red |
func | |
(*Local) Crear |
method | Crear makes the app's network. |
(*Local) Aplicar |
method | Aplicar starts the release in the background; Estado reports how it goes. |
despliegue |
struct | despliegue is what a release's containers take besides the release: whose secrets they read (a copy reads its app's) and labels of their own. |
(*Local) poner |
method | |
(*Local) desplegar |
method | desplegar starts the release's services next to the running ones, waits for them to answer, points the proxy at them and removes the old ones. |
(*Local) quitar |
method | |
(*Local) esperar |
method | esperar waits for a service to answer: its health path over HTTP, a TCP connection to its port, or, without a port, for it to keep running. |
(*Local) pausa |
method | pausa is the wait between checks of a new release (short in tests). |
(*Local) responde |
method | |
responde |
func | responde checks a service once: an HTTP answer below 500 on its health path, or else a TCP connection that stays open. |
(*Local) porQueNoResponde |
method | porQueNoResponde says why a service that is running does not answer: where it listens inside its container, when that is not its port (or only on 127.0.0.1), and its last lines. |
escucha |
struct | escucha is a socket listening inside a container. |
escuchando |
func | escuchando reads the listening sockets from /proc/net/tcp and tcp6. |
puertoEquivocado |
func | puertoEquivocado explains a service that listens elsewhere than its port ("" when it listens there, or nothing can be said). |
pistaLocalhost |
func | pistaLocalhost explains a service that looks for what it needs on localhost: inside a container that is the container itself. |
hosts |
func | hosts are the names the proxy answers a service at. |
(*Local) necesidades |
method | necesidades starts the app's Postgres and Redis, when it needs them, and returns each one's address. |
(*Local) clave |
method | clave is the password of one of the app's needs, made once and sealed: the database is initialised with it, so it never changes. |
(*Local) entorno |
method | entorno is a service's environment: PORT, its env, its needs' addresses and the values of the secrets it names. |
contenedor |
func | contenedor is the name of a service's container in a release. |
direccion |
func | direccion is how another service calls one, as in the cluster. |
propio |
func | propio reports whether a service the app needs is one of its own. |
secretoNombre |
func | |
(*Local) secreto |
method | secreto is one of the app's secrets, its keys and values (none when not set). |
(*Local) Estado |
method | Estado reports the release's rollout: as it went since rendimiento started, or, for one from before, whether its containers run. |
(*Local) Tarea |
method | Tarea runs a deploy task in a container on the app's network: the service's image and environment for a service: task, its own otherwise. |
(*Local) Quitar |
method | Quitar removes the app's containers, volumes, network and sealed values. |
(*Local) servicios |
method | servicios are the app's running service containers, newest release first. |
(*Local) Situacion |
method | Situacion is the app's status as the Apps page shows it. |
(*Local) url |
method | url is the address of a host through the proxy, with its port. |
(*Local) Recursos |
method | Recursos is what runs for the app: its services' containers, with their release, and its Postgres and Redis. |
(*Local) Reiniciar |
method | Reiniciar restarts the app's service containers. |
(*Local) Impacto |
method | Impacto lists the volumes removing the app would delete. |
(*Local) Desconectar |
method | Desconectar leaves the app's containers running, as they are. |
(*Local) LlavesSecreto |
method | LlavesSecreto lists the keys of one of the app's secrets. |
(*Local) GuardarSecreto |
method | GuardarSecreto adds, replaces or (nil) removes keys of one of the app's secrets, sealed in the Caja. |
(*Local) Recargar |
method | Recargar finds the routes of the services already running, after a restart of rendimiento. |
(*Local) Ruta |
method | Ruta is where the proxy sends a host ("" when nothing runs there). |
puertoLibre |
func | puertoLibre asks the system for a free port on 127.0.0.1. |
limites |
func | limites are a size's limits in the engine's terms ("1.5", "512m"; "" for none). |
internal/destino/local_copias.go¶
155 lines
| Name | Kind | Summary |
|---|---|---|
Copia |
struct | Copia is a pull request's copy running on this computer, or a short copy of a branch for its checks en seco (Seco). |
NombreCopia |
func | NombreCopia is the name of pull request numero's copy of app. |
NombreCopiaSeco |
func | NombreCopiaSeco is the name of the short copy of app for run's checks. |
(Copia) nombre |
method | nombre is the copy's name. |
(*Local) Copiar |
method | Copiar starts pull request numero's copy of app from rel (the copy's spec and the images its branch's run built), beside the copy it replaces, as a release starts beside the running one. |
(*Local) CopiarSeco |
method | CopiarSeco starts the short copy of app for run's checks en seco, as a pull request's copy (Copiar), at |
(*Local) copiar |
method | |
(*Local) Copias |
method | Copias are the copies running here: app's ("" for every app's), one per pull request, as its newest containers say. |
copiaDe |
func | |
(*Local) QuitarCopia |
method | QuitarCopia removes a copy: its containers, its data and its network. |
(*Local) QuitarCopiaSeco |
method | QuitarCopiaSeco removes the short copy of app for run's checks. |
(*Local) DireccionCopia |
method | DireccionCopia is where a copy answers: its first service, through the proxy. |
(*Local) DireccionCopiaSeco |
method | DireccionCopiaSeco is where the short copy for run's checks answers. |
internal/destino/local_dormir.go¶
124 lines
| Name | Kind | Summary |
|---|---|---|
(*Local) Dormir |
method | Dormir stops every container of the apps and of their pull requests' copies (the platform's own, its database, registry and BuildKit, are not theirs and keep running), and makes the proxy answer «Volvemos pronto» meanwhile. |
(*Local) Despertar |
method | Despertar starts the containers sleep stopped, finds their routes again (apps are what rendimiento knows of) and lets the proxy send people to them. |
(*Local) Desplegando |
method | Desplegando reports whether a release is still starting here (a publish that sleep waits for). |
(*Local) Dormido |
method | Dormido reports whether the proxy answers «Volvemos pronto». |
volvemosPronto |
func | volvemosPronto is the page the proxy answers while rendimiento sleeps, to whoever reaches an app (on this computer, or through a tunnel when there is one): 503 with Retry-After, so search engines and monitors know it is for a while. |
internal/destino/ninguno.go¶
70 lines
| Name | Kind | Summary |
|---|---|---|
Ninguno |
struct | Ninguno is the destination of a rendimiento that only builds and tests: apps are kept and their CI runs, and a release says it cannot deploy. |
(Ninguno) Nombre |
method | Nombre is "ninguno". |
(Ninguno) Crear |
method | Crear keeps nothing: there is nowhere to make room. |
(Ninguno) Aplicar |
method | Aplicar cannot run the release. |
(Ninguno) Estado |
method | Estado: a release never rolls out here. |
(Ninguno) Tarea |
method | Tarea cannot run a deploy task. |
(Ninguno) Quitar |
method | Quitar has nothing to remove. |
(Ninguno) Situacion |
method | Situacion: nothing runs. |
(Ninguno) Recursos |
method | Recursos is the app with nothing running. |
(Ninguno) Reiniciar |
method | Reiniciar has nothing to restart. |
(Ninguno) Impacto |
method | Impacto: removing the app destroys nothing here. |
(Ninguno) Desconectar |
method | Desconectar has nothing to leave running. |
(Ninguno) LlavesSecreto |
method | LlavesSecreto: an app's secrets need a destination. |
(Ninguno) GuardarSecreto |
method | GuardarSecreto: an app's secrets need a destination. |
internal/destino/proxy.go¶
28 lines
| Name | Kind | Summary |
|---|---|---|
(*Local) Proxy |
method | Proxy sends each request to the app running at its host on this computer ( |
internal/destino/kubernetes_tareas_test.go¶
97 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestTaskJob |
func | |
TestPreDeployJobUsesTheNewImage |
func | |
TestDryRunJob |
func | A check run en seco from a branch is a Job of its own beside the release's: named seco-, with its stage, in the app's namespace. |
TestTestsJobResources |
func | The app's own browser tests run with a browser's requests and limits, not best-effort: without a size, 250m and 256Mi asked, 2Gi of memory and no CPU limit; with one, as the spec says. |
internal/destino/kubernetes_test.go¶
208 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestKubernetes |
func | The cluster as a destination: an app is an App object, a release is written into it, and its rollout is read from what the controller reports. |
TestKubernetesOrg |
func | The App object carries its app's organization: from the start, and, for one made before organizations reached the cluster, from its next release. |
TestKubernetesPaginas |
func | The app's page from the cluster: its status, the resource tree with each part's health, a restart, and what deleting it would remove. |
TestKubernetesSecretos |
func | An app's secrets live in its namespace: none before it exists, keys listed without values, and a nil value removes its key. |
internal/destino/local_copias_test.go¶
80 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestLocalCopias |
func | A pull request's copy runs beside its app at |
internal/destino/local_test.go¶
404 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestLocal |
func | A release runs as a container per service, with its secrets and its Postgres; the proxy sends |
TestLocalEjemplos |
func | Every example that runs something rolls out on the local destination. |
TestLocalSeDetiene |
func | A service that keeps stopping fails its release with what it wrote, read before its container is removed. |
TestLocalNoResponde |
func | A service that runs but does not answer on its port fails with where it listens instead, and with the localhost it cannot reach: ping-demo's backend listened on 4000 for port: 3000 and looked for Redis on localhost. |
TestPuertoEquivocado |
func | |
TestPistaLocalhost |
func | |
TestRespondeTCP |
func | The TCP check counts a connection that the other end closes at once (a published port with nothing listening behind it) as no answer. |
internal/detect¶
Package detect inspects a repository tree and guesses how each deployable service in it is built, tested and served.
internal/detect/detect.go¶
344 lines
| Name | Kind | Summary |
|---|---|---|
Language |
type | Language is a detected language or runtime family. |
Result |
struct | Result describes one deployable service found in the repo. |
Detect |
func | Detect returns the services found at the repo root or, when the root is not itself a service, in its immediate subdirectories (monorepos). |
detectDir |
func | detectDir looks at one folder: its language (from go.mod, package.json, Python or Java build files, or an index.html for a static site), framework, port, test command and needs. |
detectGo |
func | detectGo: a Go module, its version from go.mod, port 8080, go test. |
packageJSON |
struct | |
detectNode |
func | detectNode returns false for packages that are not deployable services (mobile apps, libraries without a start or build script). |
nodeMajor |
func | nodeMajor is the Node.js major version from package.json's engines (18 or later), else 20. |
installCmd |
func | installCmd installs dependencies with the package manager the lock file belongs to (pnpm, yarn or npm). |
detectPython |
func | detectPython: Python 3.12, its framework (FastAPI, Django, Flask) from the dependencies, port 8000 (Flask's 5000), how to start it, and pytest when the project has tests. |
pythonEntrypoint |
func | pythonEntrypoint is what a Python server starts: Django's wsgi module, or the "app" in the first of main.py, app.py or server.py found (as module:app). |
detectJava |
func | detectJava: Java 21 with Maven or Gradle, port 8080, and their tests. |
exposedPort |
func | exposedPort is the port a Dockerfile EXPOSEs (the last one: the final stage's), or 0. |
exists |
func | exists reports whether dir/name exists in the repository. |
detectNeeds |
func | detectNeeds finds what the code needs from its dependencies (a Postgres driver means a database, a Redis client a cache). |
read |
func | read is a file's contents, or nothing. |
orNone |
func | orNone is s, or "none". |
internal/detect/detect_test.go¶
109 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestDetect |
func | |
TestDetectNeeds |
func |
internal/dns¶
Package dns manages the public DNS record for each app domain.
internal/dns/ddns.go¶
246 lines
| Name | Kind | Summary |
|---|---|---|
ddnsState |
struct | |
DDNSStatus |
struct | DDNSStatus is shown on the environment page. |
(*Cloudflare) auto |
method | auto: records follow the public IP (DNS_TARGET=auto). |
(*Cloudflare) DDNSStatus |
method | DDNSStatus reports the last public-IP check and change, for the Environment page. |
(*Cloudflare) target |
method | target is what new records point at: the configured value, or the detected public IP in auto mode (detecting it on first use). |
SyncResult |
struct | SyncResult reports what one dynamic DNS pass did. |
(*Cloudflare) Sync |
method | Sync detects the public IP and repoints every A record that follows it: records rendimiento created and records tagged with DDNSTag. |
(*Cloudflare) aRecords |
method | aRecords lists every A record in a zone, following pagination. |
(*Cloudflare) Run |
method | Run keeps records following the public IP until ctx ends. |
PublicIPv4 |
func | PublicIPv4 returns this network's public IPv4 address. |
fetchIP |
func | fetchIP asks one public service what our IP is. |
ParseIPResponse |
func | ParseIPResponse accepts either a bare address or Cloudflare's trace format, and only returns a public IPv4 address, so a misconfigured proxy or a private address can never be published in DNS. |
internal/dns/dns.go¶
366 lines
| Name | Kind | Summary |
|---|---|---|
Provider |
interface | Provider creates and removes the record pointing a host at the cluster's ingress. |
Description |
struct | Description is a provider's self-reported identity and health. |
Noop |
struct | Noop is used when no DNS provider is configured; records are managed by hand. |
(Noop) Ensure |
method | Ensure does nothing: records are managed by hand. |
(Noop) Remove |
method | Remove does nothing. |
(Noop) Zones |
method | Zones returns none. |
(Noop) Describe |
method | Describe reports that no DNS provider is configured. |
Cloudflare |
struct | Cloudflare implements Provider with the Cloudflare v4 API and a scoped API token (Zone:Read + DNS:Edit). |
(*Cloudflare) SetToken |
method | SetToken makes the provider use another API token from now on, without a restart (a key changed on the Environment page). |
(*Cloudflare) token |
method | token is the API token in use. |
TokenInfo |
struct | TokenInfo is what Cloudflare says of an API token. |
(*Cloudflare) Verify |
method | Verify asks Cloudflare whether the token is valid, and until when. |
(*Cloudflare) TestRecord |
method | TestRecord creates a TXT record in zone and deletes it again: the token can edit that zone's DNS. |
comment |
func | comment marks a DNS record as rendimiento's, for one app; records without it are never changed or deleted. |
record |
struct | |
(*Cloudflare) recordType |
method | recordType is A when records point at an IP (given, or the public IP followed automatically), CNAME when they point at a hostname. |
(*Cloudflare) Ensure |
method | Ensure creates or updates the record for host, marked as managed for app; it refuses to change a record another app or a person created. |
(*Cloudflare) Describe |
method | Describe verifies the API token and lists the zones it can manage. |
(*Cloudflare) Remove |
method | Remove deletes host's record if it is managed for app. |
(*Cloudflare) Zones |
method | Zones lists the zones the token can edit, for the domain picker. |
(*Cloudflare) zoneFor |
method | zoneFor finds the most specific zone that contains host. |
(*Cloudflare) find |
method | find is the zone's record for host, or nil. |
(*Cloudflare) do |
method | do calls Cloudflare's API with the token and decodes its result, turning its error list into an error. |
internal/dns/ddns_test.go¶
96 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestParseIPResponse |
func | |
TestSyncFollowsPublicIP |
func | |
TestFixedTargetSyncIsNoop |
func |
internal/dns/dns_test.go¶
133 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestEnsureCreateUpdateRemove |
func | |
TestNeverTouchesForeignRecords |
func | |
TestDescribe |
func |
internal/environment¶
Package environment inspects the cluster and integrations rendimiento depends on and reports what is installed, what is missing and how to fix it, plus node and workload health.
internal/environment/backups.go¶
162 lines
| Name | Kind | Summary |
|---|---|---|
longhornList |
func | longhornList lists Longhorn objects of a kind (volumes, backups, ...). |
(*Checker) checkBackups |
method | checkBackups reports which Longhorn volumes a backup job covers, which volumes in use are not covered, and whose last backup is too old. |
internal/environment/checks.go¶
712 lines
| Name | Kind | Summary |
|---|---|---|
checkFunc |
type | |
(*Checker) checks |
method | checks is every check of the Environment page, in the order shown; they run in parallel, from one snapshot of the cluster where they can. |
(*Checker) checkServices |
method | checkServices: each of the platform's own services (Deployments) has its pods ready. |
(*Checker) checkAPI |
method | checkAPI: the Kubernetes API answers, and which version it is. |
checkNodes |
func | checkNodes: how many nodes are ready, of which architectures (builds are made for them). |
checkMetrics |
func | checkMetrics: whether the metrics server gives live CPU and memory use. |
imageVersion |
func | imageVersion returns the tag of an image reference, without any digest. |
findDeployment |
func | findDeployment returns the first deployment running an image containing substr. |
deploymentReady |
func | deploymentReady reports whether every replica of d is ready, and says how many are. |
firstImage |
func | firstImage is the image of d's first container whose name contains substr. |
(*Checker) checkIngress |
method | checkIngress: the IngressClass apps use exists, and its controller runs. |
(*Checker) checkCertManager |
method | checkCertManager: cert-manager is installed and running, so apps get HTTPS certificates. |
(*Checker) checkIssuer |
method | checkIssuer: the ClusterIssuer apps' certificates come from exists and is ready. |
checkCertificates |
func | checkCertificates: every certificate in the cluster is valid, listing those that are not. |
(*Checker) checkStorage |
method | checkStorage: the storage class for app volumes exists (and which one is the default). |
(*Checker) checkBuildkit |
method | checkBuildkit: the BuildKit daemons that build images answer. |
(*Checker) checkRegistry |
method | checkRegistry: the image registry answers its API (/v2/). |
(*Checker) checkBuildNamespace |
method | checkBuildNamespace: the namespace where CI steps run exists. |
(*Checker) checkBuildIsolation |
method | checkBuildIsolation reports whether CI pods, which run repo code, are fenced off from the rest of the cluster by a NetworkPolicy. |
(*Checker) checkDNS |
method | checkDNS: the DNS provider that creates app records works, and its token does not expire within TokenWarning. |
(*Checker) checkAI |
method | checkAI: the platform's AI (its key, or a local model) is set up; it is optional, so being off is not a warning. |
(*Checker) checkLogArchive |
method | checkLogArchive: old step logs are moved to object storage (otherwise they stay in Postgres). |
(*Checker) checkAnalytics |
method | checkAnalytics: Umami answers, for each app's visitor numbers (optional). |
(*Checker) checkNotifications |
method | checkNotifications: emails about failed runs, rollbacks and outages can be sent, and to whom. |
(*Checker) checkGitHub |
method | checkGitHub: where the code lives. |
(*Checker) checkDatabase |
method | checkDatabase: the platform's Postgres answers. |
(*Checker) providers |
method | providers describes each swappable slot, its active option and the roadmap. |
(*Checker) otherForjas |
method | otherForjas are the GitLabs and Bitbucket workspaces connected (none when Forjas is not set). |
internal/environment/cluster.go¶
283 lines
| Name | Kind | Summary |
|---|---|---|
snapshot |
struct | snapshot is read once per report and shared by the checks. |
Distribution |
func | Distribution identifies the Kubernetes flavor from the server version and node metadata. |
(*Checker) snapshot |
method | snapshot is one look at the cluster the checks share: version, nodes and their use, deployments, problems in pods and certificates. |
podProblems |
func | podProblems lists pods that are failing or stuck. |
(*Checker) certificateProblems |
method | certificateProblems counts the certificates and lists those not ready. |
internal/environment/environment.go¶
349 lines
| Name | Kind | Summary |
|---|---|---|
Status |
type | Status is the state of one check or provider. |
(Status) rank |
method | rank orders statuses from best to worst for roll-ups. |
worst |
func | worst is the more serious of two statuses. |
Category |
type | Category groups checks on the Environment page. |
Check |
struct | Check is one requirement and its state. |
Option |
struct | Option is one choice for a provider slot; unavailable ones are on the roadmap. |
Provider |
struct | Provider is one swappable slot: where apps run, who serves DNS, etc. |
Node |
struct | Node is one cluster node with its capacity, usage and health. |
Problem |
struct | Problem is an unhealthy workload or certificate somewhere in the cluster. |
ClusterInfo |
struct | ClusterInfo summarizes the cluster (version, node and pod counts). |
Report |
struct | Report is everything the Environment page shows. |
ddnsReporter |
interface | ddnsReporter is implemented by DNS providers that support dynamic DNS. |
(*Checker) Invalidate |
method | Invalidate drops the cached report, e.g. |
Config |
struct | Config is what the platform expects from the environment. |
Forja |
struct | Forja is a GitLab or a Bitbucket workspace connected: its kind ("gitlab", "bitbucket") and how it is named (GitLab gitlab.com). |
Pinger |
interface | Pinger is satisfied by the store. |
Checker |
struct | Checker builds environment reports and caches them for TTL. |
(*Checker) Report |
method | Report returns the environment report: a new one, or an older one at once while a new one is made behind it (refresh waits for a new one). |
(*Checker) build |
method | build makes the report: a snapshot of the cluster, every check run in parallel, and an overall status and summary. |
internal/environment/backups_test.go¶
70 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCheckBackups |
func | |
TestCheckBackupsWithoutLonghorn |
func |
internal/environment/environment_test.go¶
271 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestFullyInstalledCluster |
func | |
TestBareCluster |
func | |
TestReportIsCached |
func | |
TestDistribution |
func | |
TestPlatformServices |
func | Each of the platform's services shows its ready pods; one that is down fails the check, one that is not deployed is skipped. |
internal/events¶
Package events fans out live updates (step status, log lines) to UI subscribers over SSE.
internal/events/ask.go¶
104 lines
| Name | Kind | Summary |
|---|---|---|
request |
struct | request is an Ask: the data and the topic the answer goes to. |
answer |
struct | answer is the reply to an Ask: data, or an error's message. |
RemoteError |
struct | RemoteError is an error returned by the process that answered. |
(*RemoteError) Error |
method | |
(*Hub) Ask |
method | Ask publishes a request on topic and waits for an answer (see Answer) until ctx ends. |
(*Hub) Answer |
method | Answer serves the requests published on topic with fn until ctx ends. |
Decode |
func | Decode reads an event's data into v: a value published in this process, or JSON that came from another. |
internal/events/bridge.go¶
157 lines
| Name | Kind | Summary |
|---|---|---|
Wire |
interface | Wire is what the bridge needs from the database (the store). |
Bridge |
struct | Bridge joins the hubs of the platform's processes through Postgres, so a run's log lines reach the UI from whichever process runs it, and two versions overlapping during an update see the same events. |
wireOut |
struct | |
message |
struct | message is what travels on the channel: the event itself, or (when too large) the id of the row that holds it. |
(*Bridge) Run |
method | Run relays this process's events and delivers the others' until ctx ends. |
(*Bridge) Origin |
method | Origin identifies this process on the channel (set by Run). |
(*Bridge) send |
method | |
(*Bridge) publish |
method | |
(*Bridge) receive |
method |
internal/events/hub.go¶
79 lines
| Name | Kind | Summary |
|---|---|---|
Event |
struct | Event is one live update sent to UI subscribers. |
Hub |
struct | Hub is an in-process publish/subscribe fan-out keyed by topic ("run/42", "app/shop"). |
NewHub |
func | NewHub returns an empty hub. |
(*Hub) Subscribe |
method | Subscribe returns a channel for topic and a cancel func that must be called. |
(*Hub) SetRelay |
method | SetRelay passes every event published here to relay as well (it must not block: CI publishes log lines). |
(*Hub) Publish |
method | Publish sends e to every subscriber of topic without blocking (a subscriber that is behind misses it and refetches on reconnect), and to the relay, if any. |
(*Hub) Deliver |
method | Deliver sends e to this process's subscribers only: an event that came from another process. |
internal/events/bridge_test.go¶
184 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestBridge |
func | Two processes: what one publishes reaches the other's subscribers, large events through a stored row, and nobody gets an event twice. |
TestAsk |
func | A question asked in one process is answered by the other, and errors and silence come back as such. |
internal/events/hub_test.go¶
25 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestHub |
func |
internal/firma¶
Package firma signs and checks rendimiento's releases (decision 138): each release's SHA256SUMS is signed with Ed25519 when it is published, and rendimiento installs a downloaded version only when that signature checks out against the public key it carries (Publica), and the file's sum is the one SHA256SUMS lists.
internal/firma/firma.go¶
97 lines
| Name | Kind | Summary |
|---|---|---|
Firmar |
func | Firmar signs data with a private key (base64, as Nueva writes it) and returns the signature, base64. |
Revisar |
func | Revisar checks a signature (base64) of data against a public key (base64; "" means Publica). |
Nueva |
func | Nueva makes a key pair: the private key (for GitHub's secrets) and the public one (for Publica), both base64. |
Suma |
func | Suma is the sum SHA256SUMS lists for a file name. |
Comprobar |
func | Comprobar checks a downloaded file: SHA256SUMS signed by rendimiento's key, and the file's sum the one it lists for nombre. |
internal/firma/firma_test.go¶
57 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestFirma |
func | |
TestLlaveDeLaVentana |
func | The window of rendimiento for Windows (escritorio/, a module of its own) carries a copy of the key: it must be this one. |
internal/forja¶
Package forja is what rendimiento does where an app's code lives: GitHub today, GitLab and Bitbucket next.
internal/forja/enlaces.go¶
117 lines
| Name | Kind | Summary |
|---|---|---|
Of |
func | Of is the forja a repository lives on, read from how rendimiento writes it: owner/name on GitHub (whose accounts have no dots), bitbucket.org/ workspace/repo on Bitbucket, and a GitLab's address first on GitLab (git.example.com/group/project). |
RepoURL |
func | RepoURL is the repository's page (web/src/forja.ts says the same). |
PullURL |
func | PullURL is a change's page: the pull request on GitHub and Bitbucket, the merge request on GitLab. |
NewPullURL |
func | NewPullURL is where a person opens the change of a branch (into base; "" is the default branch). |
BranchOfLink |
func | BranchOfLink reads the repository and branch out of a link to a branch: GitHub's …/pull/new/ |
internal/forja/forja.go¶
160 lines
| Name | Kind | Summary |
|---|---|---|
Forja |
interface | Forja is one forge rendimiento works with. |
Repos |
interface | Repos is what rendimiento does in a repository. |
Webhooks |
interface | Webhooks is how a forja tells rendimiento of each push. |
SignIn |
interface | SignIn is signing people in with their account on the forja. |
FilesOf |
func | FilesOf is a tree's text files, each up to maxFile bytes: what Files gives, for a forja that reads a tree as an fs.FS (RepoFS). |
IsNotFound |
func | IsNotFound reports whether err says that something is not there. |
Says |
func | Says is the sentence the forja gave for refusing, without the rest of its answer; err's own text when it gave none. |
SaysSkipCI |
func | SaysSkipCI reports whether a commit message asks for no run, the way GitHub Actions reads it: [skip ci], [ci skip] or [no ci], in any case. |
internal/forja/tipos.go¶
129 lines
| Name | Kind | Summary |
|---|---|---|
Check |
struct | Check says on a commit, and on its pull, whether it passed (a check run on GitHub). |
Output |
struct | Output is a check's title and summary. |
CheckOutput |
func | CheckOutput builds a check's title and summary. |
Opened |
struct | Opened is a pull opened (or found open) by rendimiento. |
Branch |
struct | Branch is a branch and the commit it points at. |
Change |
struct | Change is a pull request (a merge request on GitLab): what the Caminos tab, previews and merging need of it. |
Event |
struct | Event is one webhook delivery, read. |
Push |
struct | Push is a push to a branch. |
ChangeEvent |
struct | ChangeEvent is a pull opened, reopened or closed. |
Renovate |
struct | Renovate is what Renovate needs to work on a connection's repositories of a forja other than GitHub: its platform's name for Renovate (gitlab, bitbucket), the API's address, a token that lasts the run, and each repository in Renovate's words (group/project) with its Repo in rendimiento's (git.example.com/group/project). |
internal/forja/enlaces_test.go¶
84 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestOf |
func | |
TestBranchLinks |
func | |
TestFilesOf |
func |
internal/fresco¶
Package fresco keeps slow answers (another service's numbers, a look at the cluster) so a page does not wait for them each time: a new answer is given as is; an old one is given at once while a new one is made behind it; and an answer never made yet is waited for, but only so long.
internal/fresco/fresco.go¶
201 lines
| Name | Kind | Summary |
|---|---|---|
Cache |
struct | Cache keeps one answer per key. |
entry |
struct | |
call |
struct | call is one making in flight; done closes when it ends. |
(*?) clock |
method | |
(*?) Get |
method | Get is key's answer: made with fetch when it has none, or when its answer is old (then the old one is the answer, and the new one is for the next look). |
(*?) Refresh |
method | Refresh waits for a new answer (joining a making in flight), for a person who asked to look again. |
(*?) get |
method | |
(*?) make |
method | make runs one making in a slot and keeps what it made; a failure keeps the old answer. |
(*?) Forget |
method | Forget drops key's answer (every key's, with no key): the next look waits for a new one. |
(*?) prune |
method | prune drops answers nobody looked for in Keep, at most once a minute. |
internal/fresco/fresco_test.go¶
250 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestFreshIsReused |
func | |
TestStaleIsAnsweredThenReplaced |
func | An old answer is given at once while the new one is made, which then replaces it. |
TestFailureKeepsOld |
func | A failed making keeps the old answer; with none, the look gets the error. |
TestFirstWaitIsBounded |
func | A first look waits only Wait; the making goes on and the next look has it. |
TestOneMakingAndParallel |
func | Many first looks of one key share one making; Parallel bounds makings. |
TestRefreshAndForget |
func | Refresh waits for a new answer; Forget makes the next look wait for one. |
internal/generate¶
Package generate turns detection results into a proposed rendimiento.yaml plus any files the repo is missing (Dockerfiles).
internal/generate/generate.go¶
201 lines
| Name | Kind | Summary |
|---|---|---|
Input |
struct | Input is what generation works from: the repo, its files and what detection found. |
Plan |
struct | Plan is what the wizard shows and, once confirmed, commits in a PR. |
Generator |
interface | Generator proposes a rendimiento.yaml and missing files for a repo. |
Templates |
struct | Templates is the deterministic, rule-based generator. |
(Templates) Generate |
method | Generate proposes one service per detected directory and a Dockerfile from templates for those without one. |
pickFrontDoor |
func | pickFrontDoor chooses which service gets the bare |
sizeFor |
func | sizeFor is the starting size for a language: Java large, Go, static and Vite sites small, the rest medium. |
dfData |
struct | |
dockerfile |
func | dockerfile writes a Dockerfile for the detected language from the templates (an error for a language with none). |
pythonCmd |
func | pythonCmd returns the container CMD (JSON form) and any server package that must be installed alongside the app's own requirements. |
Slug |
func | Slug converts a repo or directory name into a DNS label. |
internal/generate/generate_test.go¶
81 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestGoRepoGetsDockerfile |
func | |
TestExistingDockerfileIsKept |
func | |
TestMonorepoDomainsAndPython |
func | |
TestSlug |
func |
internal/github¶
Package github talks to GitHub as a GitHub App: short-lived installation tokens instead of personal access tokens, webhooks delivered for every installed repo, check runs for CI status and PRs for onboarding.
internal/github/app.go¶
430 lines
| Name | Kind | Summary |
|---|---|---|
Credentials |
struct | Credentials are produced once by the manifest flow and stored in a Kubernetes Secret. |
App |
struct | App is the GitHub App: it signs JWTs with its private key and exchanges them for installation tokens. |
(*App) SetAccounts |
method | SetAccounts limits the App to installations on these accounts (user or organization logins, any case); none allows every installation. |
(*App) Allows |
method | Allows reports whether an installation on the account login counts. |
cachedToken |
struct | |
New |
func | New parses the App's private key. |
(*App) Credentials |
method | Credentials returns what the App was created with. |
(*App) base |
method | base is GitHub's API address (changed in tests). |
(*App) client |
method | client is the HTTP client (30 seconds at most per request by default). |
(*App) JWT |
method | JWT authenticates as the app itself (RS256, 9 minute lifetime). |
(*App) InstallationToken |
method | InstallationToken returns a cached token for the installation, refreshing it five minutes before expiry. |
(*App) InstallationTokenFor |
method | InstallationTokenFor returns a token that stays valid for at least atLeast: the cached one when it has that long left, else a new one. |
Installation |
struct | Installation is the App installed on one account (user or organization). |
(*App) Installations |
method | Installations lists the accounts the App is installed on (those it allows: see SetAccounts). |
(*App) Installation |
method | Installation returns one installation the App allows, or an error. |
(*App) Client |
method | Client returns an API client acting as the given installation. |
(*App) do |
method | do performs a JSON API call. |
APIError |
struct | APIError is a non-2xx response from the GitHub API. |
(*APIError) Error |
method | Error implements error. |
(*APIError) Is |
method | Is makes errors.Is find forja.ErrNotFound in a 404, and forja.ErrConflict in a 409 (a merge whose head moved). |
(*APIError) Says |
method | Says is the sentence GitHub gave for refusing, without the rest of its answer ("" when its answer has none): see forja.Says. |
desfase |
func | desfase is how far now is from a response's Date header, when over a minute (the signature allows for one); 0 otherwise or without a date. |
duracion |
func | duracion says a clock difference in hours and minutes ("10 h", "5 h 3 min", "4 min"). |
IsNotFound |
func | IsNotFound reports whether err is a GitHub 404. |
VerifyWebhook |
func | VerifyWebhook checks X-Hub-Signature-256 in constant time. |
(*App) FreshInstallationToken |
method | FreshInstallationToken mints a new token (valid one hour) instead of reusing a cached one, for jobs that need the full hour, such as Renovate. |
(*App) InstallationPermissions |
method | InstallationPermissions are what the account owner granted, e.g. |
BotIdentity |
struct | BotIdentity is the app's bot user, as commits and PRs show it: login " |
(*App) Bot |
method | Bot returns the App's bot user, as commits and pull requests show it. |
internal/github/client.go¶
841 lines
| Name | Kind | Summary |
|---|---|---|
Client |
struct | Client makes API calls as one installation. |
(*Client) do |
method | do calls GitHub's API as the installation, with a token for it. |
Repo |
struct | Repo is a repository the installation can access. |
(*Client) Repos |
method | Repos lists every repo the installation can access. |
(*Client) Repo |
method | Repo returns one repository (default branch, visibility). |
RepoFS |
struct | RepoFS exposes a commit's tree as a read-only fs.FS. |
treeEntry |
struct | |
(*Client) FS |
method | FS returns the repository tree at ref as an fs.FS; files are downloaded when opened. |
(*RepoFS) Open |
method | Open implements fs.FS. |
(*RepoFS) blob |
method | blob is a file's contents, downloaded once and kept. |
fileInfo |
struct | |
(fileInfo) Name |
method | Name implements fs.FileInfo. |
(fileInfo) Size |
method | Size implements fs.FileInfo. |
(fileInfo) Mode |
method | Mode implements fs.FileInfo. |
(fileInfo) ModTime |
method | ModTime implements fs.FileInfo (unknown, zero). |
(fileInfo) IsDir |
method | IsDir implements fs.FileInfo. |
(fileInfo) Sys |
method | Sys implements fs.FileInfo. |
blobFile |
struct | |
(*blobFile) Stat |
method | Stat implements fs.File. |
(*blobFile) Read |
method | Read implements fs.File. |
(*blobFile) Close |
method | Close implements fs.File. |
dirFile |
struct | |
(*dirFile) Stat |
method | Stat implements fs.File. |
(*dirFile) Read |
method | Read fails: directories cannot be read, only listed. |
(*dirFile) Close |
method | Close implements fs.File. |
(*dirFile) ReadDir |
method | ReadDir implements fs.ReadDirFile. |
PullRequest |
type | PullRequest is an opened (or existing) pull request. |
(*Client) OpenPR |
method | OpenPR commits files on a new branch off base in a single commit and opens a pull request. |
CheckRun |
type | CheckRun is a GitHub check shown on commits and pull requests. |
CheckOutput |
func | CheckOutput builds a check run's title and summary. |
(*Client) CreateCheckRun |
method | CreateCheckRun starts a check run and returns its ID. |
(*Client) UpdateCheckRun |
method | UpdateCheckRun changes a check run's status or conclusion. |
(*Client) FileAt |
method | FileAt returns a file at a ref, or IsNotFound. |
(*Client) ChangedFiles |
method | ChangedFiles lists files that differ between two commits. |
(*Client) BranchSHA |
method | BranchSHA returns the commit a branch points at. |
Branch |
type | Branch is a branch and the commit it points at. |
(*Client) Branches |
method | Branches lists a repo's branches (the first 100). |
PullInfo |
type | PullInfo is what the Caminos tab needs of a pull request. |
(*Client) OpenPulls |
method | OpenPulls lists a repo's open pull requests (up to 100), the most recently updated first. |
(*Client) Pull |
method | Pull is one pull request, with whether it can be merged. |
(*Client) MergePull |
method | MergePull merges a pull request with a merge commit, only while its head is still sha: what was tested is what is merged. |
(*Client) CreatePull |
method | CreatePull opens a pull request from a branch of the repository into base and returns its number; when the branch already has one open, that one's. |
(*Client) CommitSubject |
method | CommitSubject is the first line of a commit's message. |
(*Client) Comment |
method | Comment writes a comment on a pull request (or issue) and returns its id; with id set, it edits that comment instead, so one comment is kept up to date rather than one per push. |
(*Client) ClosePull |
method | ClosePull closes a pull request without merging it. |
(*Client) DeleteBranch |
method | DeleteBranch deletes a branch. |
(*Client) RecentPullRequests |
method | RecentPullRequests lists a repo's 100 most recently updated pull requests, open and closed. |
(*Client) MergeBase |
method | MergeBase is the best common ancestor of two commits or branches, with its commit time. |
(*Client) FirstParent |
method | FirstParent returns a commit's first parent ("" for a root commit). |
(*Client) PutFile |
method | PutFile creates or updates one file on a branch as a single commit and returns the commit's SHA. |
(*Client) DeleteFile |
method | DeleteFile removes one file on a branch as a single commit. |
(*Client) fileSHA |
method | fileSHA is the blob SHA of a file on a branch, which GitHub asks for to replace it. |
(*Client) CreateOrgRepo |
method | CreateOrgRepo creates a public repository in an organization, with a first commit (a README) so files can be committed on its default branch. |
(*Client) CommitFiles |
method | CommitFiles commits files (any content, photos included) and removes paths on branch, in a single commit on top of its head, and returns the commit's SHA. |
(*Client) CommitMerge |
method | CommitMerge makes a merge commit on branch: its parents are the branch's head, which must still be at head, and other (the default branch's head, say); its tree is the branch's with files written and remove deleted, the merge already worked out. |
(*Client) commitOn |
method | commitOn commits files and removals on branch's head (which must be want, unless want is ""), with other as a second parent when set. |
(*Client) modes |
method | modes are the modes of the files in commit sha's tree, by path ("100755" for an executable); empty when GitHub does not say, and without the files a truncated (very large) tree leaves out. |
(*Client) AddCollaborator |
method | AddCollaborator invites a GitHub user to a repository with permission (pull, triage, push, maintain or admin). |
(*Client) Files |
method | Files downloads a repository at ref (one archive, not a call per file) and returns its text files by path, leaving out those over maxFile bytes and those that are not UTF-8 text. |
(*Client) CreateBranch |
method | CreateBranch makes branch start at sha. |
internal/github/forja.go¶
128 lines
| Name | Kind | Summary |
|---|---|---|
(*Holder) Name |
method | Name is the forja's short name. |
(*Holder) Ready |
method | Ready is nil once the GitHub App is set up (ErrNotConfigured before). |
(*Holder) Allows |
method | Allows says whether the App serves an account (see App.Allows); no account is served before setup. |
(*Holder) AuthorizeURL |
method | AuthorizeURL is where "Sign in with GitHub" sends people. |
(*Holder) SignIn |
method | SignIn trades a sign-in code for the person's GitHub login. |
(*Holder) ParseWebhook |
method | ParseWebhook checks a delivery's X-Hub-Signature-256 with the App's webhook secret and reads the events rendimiento acts on: a push to a branch, and a pull request opened, reopened or closed. |
parseWebhook |
func | parseWebhook reads a delivery already verified. |
internal/github/holder.go¶
293 lines
| Name | Kind | Summary |
|---|---|---|
Holder |
struct | Holder holds the current GitHub App, which appears at runtime after the one-click setup, and adapts it to the per-installation calls the platform makes. |
(*Holder) Set |
method | Set installs the App (at startup, or after the setup flow). |
(*Holder) Get |
method | Get returns the App, or ErrNotConfigured before setup. |
(*Holder) client |
method | client is an API client for the installation (ErrNotConfigured before setup). |
(*Holder) FileAt |
method | FileAt reads one file of repo at ref. |
(*Holder) RepoFS |
method | RepoFS returns repo's tree at ref as an fs.FS. |
(*Holder) OpenPR |
method | OpenPR commits files to branch and opens (or finds) a pull request into base. |
(*Holder) CreateCheck |
method | CreateCheck starts a check run on a commit. |
(*Holder) UpdateCheck |
method | UpdateCheck updates a check run. |
(*Holder) CloneToken |
method | CloneToken returns an installation token for cloning in build pods. |
(*Holder) ChangedFiles |
method | ChangedFiles lists files that differ between two commits (for change detection). |
(*Holder) BranchSHA |
method | BranchSHA resolves a branch to its head commit. |
(*Holder) Branches |
method | Branches lists a repo's branches with their head commits. |
(*Holder) RecentPullRequests |
method | RecentPullRequests lists a repo's most recently updated pull requests. |
(*Holder) OpenPulls |
method | OpenPulls lists a repo's open pull requests. |
(*Holder) Pull |
method | Pull is one pull request, with whether it can be merged. |
(*Holder) MergePull |
method | MergePull merges a pull request while its head is still sha. |
(*Holder) CreatePull |
method | CreatePull opens a pull request from a branch into base, or finds the one already open, and returns its number. |
(*Holder) CommitSubject |
method | CommitSubject is the first line of a commit's message. |
(*Holder) Comment |
method | Comment writes or edits a comment on a pull request (see Client.Comment). |
(*Holder) ClosePull |
method | ClosePull closes a pull request without merging it. |
(*Holder) DeleteBranch |
method | DeleteBranch deletes a branch; one already gone is not an error. |
(*Holder) MergeBase |
method | MergeBase is the best common ancestor of two commits or branches. |
(*Holder) FirstParent |
method | FirstParent returns a commit's first parent. |
(*Holder) Files |
method | Files downloads a repository at ref and returns its text files by path. |
(*Holder) CreateBranch |
method | CreateBranch makes branch point at sha (fine if it exists). |
(*Holder) CommitFiles |
method | CommitFiles commits files and removals on branch in one commit. |
(*Holder) ForOwner |
method | ForOwner returns an API client for the installation on an account (user or organization), found by the account's login. |
(*Holder) CommitMerge |
method | CommitMerge makes a merge commit on branch (see Client.CommitMerge). |
internal/github/oauth.go¶
138 lines
| Name | Kind | Summary |
|---|---|---|
errorsAs |
func | errorsAs is errors.As that accepts a nil error. |
Manifest |
func | Manifest describes the app GitHub should create. |
Local |
func | Local reports whether the platform's address is this computer (localhost, 127.0.0.1), which GitHub cannot reach. |
manifest |
func | |
ConvertManifest |
func | ConvertManifest exchanges the one-time code for the new app's credentials. |
(*App) AuthorizeURL |
method | AuthorizeURL is where the login button sends people (GitHub OAuth through the App). |
(*App) Login |
method | Login exchanges an OAuth code for the user's login name. |
decodeJSON |
func | decodeJSON reads a JSON answer, or an APIError for a status of 300 or more. |
internal/github/forja_test.go¶
133 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestForjaBeforeSetup |
func | Before setup the forja is not ready, signs nobody in and reads no webhook. |
TestForjaWebhookPush |
func | A push comes through the forja as a neutral Push, only when it is signed. |
TestForjaWebhookChange |
func | A pull request closed by a merge comes as a ChangeEvent. |
TestForjaErrors |
func | GitHub's errors answer the forja's questions. |
internal/github/github_test.go¶
425 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestJWTIsValidRS256 |
func | |
TestInstallationTokenCached |
func | |
TestCloneTokenLastsTheWait |
func | A clone token must last while its pod waits to clone: one with less than CloneValidity left is replaced, though other calls may still use it. |
TestInstallationsOnlyAllowedAccounts |
func | |
TestRepoFSDrivesDetection |
func | |
TestOpenPRSingleCommit |
func | |
TestVerifyWebhook |
func | |
TestFilesFromOneArchive |
func | A repository comes down in one archive: its text files by path, without the archive's top folder, big files or binary ones. |
TestCreateBranchFromTheRightCommit |
func | A branch that exists is kept when it contains the commit to start from, and moved to it when it was made from elsewhere. |
TestRelojAdelantado |
func | A 401 from a computer whose clock is off says so: GitHub refuses the app's signature as "Bad credentials", which does not say why. |
TestCommitMergeKeepsModes |
func | A merge writes each file with the mode it had: a script stays executable, a file new to the branch takes main's mode. |
TestFileAtLargeFileFromItsBlob |
func | A file over 1 MB comes from the contents API without its content; it is read from its blob. |
internal/github/oauth_test.go¶
57 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestManifestLocal |
func | On a computer GitHub cannot reach, the App gets no webhook (the platform asks for new commits instead); elsewhere it keeps it. |
TestManifestComesBack |
func | GitHub sends the person back to the platform after they choose the repositories, on this computer too. |
TestAPIBase |
func | With GITHUB_API_URL (APIBase), the App is created at that address and not at GitHub's: how an installed rendimiento is tested against a stand-in. |
internal/gitlab¶
Package gitlab is GitLab's forja: gitlab.com or a GitLab of one's own, through its REST API (v4).
internal/gitlab/api.go¶
351 lines
| Name | Kind | Summary |
|---|---|---|
APIError |
struct | APIError is GitLab answering with a status of 300 or more. |
(*APIError) Error |
method | |
(*APIError) Is |
method | Is makes errors.Is find forja.ErrNotFound in a 404, and forja.ErrConflict in a 409 (a merge whose head moved). |
(*APIError) Says |
method | Says is the sentence GitLab gave for refusing ("" when none): its "message" (a text, a list or an object of lists) or its "error". |
(*Forja) api |
method | api calls GitLab's API v4 on connection c with its token: path starts with "/" and is relative to /api/v4. |
(*Forja) call |
method | call is one request with a bearer token; out, when not nil, is a *[]byte for the raw answer or anything JSON decodes into. |
AuthorizeURLFor |
func | AuthorizeURLFor is where a person authorizes the connection's application on its GitLab, with the scopes asked: GitLab sends them back to redirect with state and a code. |
Tokens |
struct | Tokens is GitLab's answer to /oauth/token. |
(Tokens) expires |
method | expires is when the access token stops working (two hours when GitLab does not say). |
(*Forja) oauthToken |
method | oauthToken posts a grant to the connection's /oauth/token. |
User |
struct | User is a GitLab account: its id never changes, its username may. |
(*Forja) Exchange |
method | Exchange trades a code for the account that authorized it and its tokens. |
(*Forja) Authorized |
method | Authorized keeps the tokens a person's authorization gave the connection: rendimiento acts with them from now on. |
(*Forja) token |
method | token is a valid access token for the connection: the kept one while it has five minutes left, else a refreshed one (which is kept: GitLab replaces the refresh token on each use). |
(*Forja) cache |
method | cache is remember with f.mu already held. |
(*Forja) first |
method | first is the oldest connection: the one forja.SignIn signs in with. |
(*Forja) AuthorizeURL |
method | AuthorizeURL is where "Sign in with GitLab" sends people, on the oldest connection (the API signs in on the one a person picks: AuthorizeURLFor). |
(*Forja) SignIn |
method | SignIn trades a sign-in code of the oldest connection for the account's name in rendimiento's words (Login). |
Login |
func | Login is how a GitLab account not linked to anyone is named in rendimiento: its username at its GitLab's address ([email protected]). |
internal/gitlab/gitlab.go¶
271 lines
| Name | Kind | Summary |
|---|---|---|
Secret |
struct | Secret is what a connection keeps out of the database: the OAuth application's secret, the webhooks' token, and the tokens rendimiento acts with. |
Keys |
interface | Keys keeps each connection's Secret: in a Kubernetes Secret, or sealed in the Caja (see api.GitLabSecrets and secretos.GitLab). |
Connection |
struct | Connection is one GitLab rendimiento works with (a row of gitlab_connections, store.GitLabConnection). |
Connections |
interface | Connections is where the connections are listed (the store): a connection that is not there is ErrNotConnected. |
TokenLocker |
interface | TokenLocker, when the Connections has it (the store's does, with a Postgres advisory lock), holds a connection's token refresh for one process at a time: the refresh token changes on each use, so two refreshing at once would clash. |
Forja |
struct | Forja is GitLab's forja, for every connection. |
(*Forja) Name |
method | Name is the forja's short name. |
(*Forja) Ready |
method | Ready is nil once a GitLab is connected. |
(*Forja) Allows |
method | Allows: a GitLab is connected on purpose, and only its projects that an administrator made apps of are built, so every account counts. |
(*Forja) client |
method | client is the HTTP client (30 seconds at most per request by default). |
Host |
func | Host is the connection's address without its scheme, the start of its apps' Repo: "gitlab.com", "git.example.com:8443/gitlab". |
NormalizeURL |
func | NormalizeURL checks a GitLab's address and writes it one way: https://git.example.com, without a trailing slash. |
local |
func | local says whether a host name is on this network. |
(*Forja) connection |
method | connection is a connection and its secret. |
(*Forja) secret |
method | secret is the connection's secret, cached; fresh reads it again. |
(*Forja) remember |
method | remember caches a connection's secret. |
(*Forja) Forget |
method | Forget drops a connection's cached secret (it was connected again or removed). |
project |
func | project is the project's path on its GitLab: repo without the connection's address. |
RepoOf |
func | RepoOf is an app's Repo for a project of the connection. |
(*Forja) CloneURL |
method | CloneURL is where build pods clone a GitLab app's repository from. |
internal/gitlab/renovate.go¶
38 lines
| Name | Kind | Summary |
|---|---|---|
(*Forja) Renovate |
method | Renovate is what a Renovate run on the connection's projects needs: its API, a token that lasts at least last (refreshed first when the kept one would not), and each project's path. |
(*Forja) tokenLasting |
method | tokenLasting is a token with at least last left: the kept one, or a refreshed one. |
internal/gitlab/repos.go¶
894 lines
| Name | Kind | Summary |
|---|---|---|
projectAPI |
func | projectAPI is the API path of a project of the connection: its path, escaped as one segment (group%2Fproject). |
(*Forja) in |
method | in calls the API on a project, as the connection installation. |
(*Forja) FileAt |
method | FileAt reads one file of repo at ref. |
(*Forja) RepoFS |
method | RepoFS is repo's tree at ref, read from its archive in one request. |
untar |
func | untar reads a project's archive into a tree, without its first folder (project-ref-sha/). |
(*Forja) ChangedFiles |
method | ChangedFiles lists the files that differ between base and head (from their merge base, as GitHub's compare does); complete is false when GitLab gave up or cut the list. |
glBranch |
struct | glBranch is a branch as GitLab writes it. |
(*Forja) BranchSHA |
method | BranchSHA is the commit a branch points at. |
(*Forja) Branches |
method | Branches lists the project's branches (the first 100). |
glCommit |
struct | glCommit is a commit as GitLab writes it. |
(*Forja) CommitSubject |
method | CommitSubject is the first line of a commit's message. |
(*Forja) MergeBase |
method | MergeBase is the best common ancestor of two commits or branches, with its commit time. |
(*Forja) FirstParent |
method | FirstParent is a commit's first parent ("" for the first commit). |
(*Forja) CloneToken |
method | CloneToken is what build pods clone with: GitLab takes an OAuth token as the password of the user "oauth2" (the clone script uses a token with a ":" as user:password). |
StatusState |
func | StatusState is the commit status a check is shown as on GitLab, and its description. |
(*Forja) postStatus |
method | postStatus writes a commit status and returns its id. |
(*Forja) CreateCheck |
method | CreateCheck writes the commit's status under the check's name. |
(*Forja) UpdateCheck |
method | UpdateCheck writes the status again: GitLab keeps one per commit and name, so the check must say both (the platform does). |
glMR |
struct | glMR is a merge request as GitLab writes it. |
(glMR) change |
method | change is a merge request in the forja's words. |
mergeable |
func | mergeable reads whether GitLab would merge it, the way GitHub says it: nil while it is still checking, false and "dirty" for a conflict, "blocked" for what GitLab asks first (a review, a draft). |
(*Forja) mrs |
method | mrs lists merge requests with the query given. |
(*Forja) RecentPullRequests |
method | RecentPullRequests lists the project's 100 most recently updated merge requests, open and closed. |
(*Forja) OpenPulls |
method | OpenPulls lists the open merge requests (up to 100), the most recently updated first. |
(*Forja) Pull |
method | Pull is one merge request, with whether it can be merged. |
waits |
struct | waits is a merge GitLab will do itself, once the pipeline passes. |
(waits) Error |
method | |
(waits) Says |
method | |
(*Forja) MergePull |
method | MergePull merges a merge request while its head is still sha. |
(*Forja) CreatePull |
method | CreatePull opens a merge request from a branch into base and returns its number; when the branch already has one open, that one's. |
(*Forja) Comment |
method | Comment writes a note on a merge request and returns its id; with id set, it edits that note instead. |
(*Forja) ClosePull |
method | ClosePull closes a merge request without merging it. |
(*Forja) DeleteBranch |
method | DeleteBranch deletes a branch; one already gone is not an error. |
(*Forja) OpenPR |
method | OpenPR commits files on a new branch off base in one commit and opens a merge request (or finds the one open). |
(*Forja) Files |
method | Files is repo's text files at ref, each up to maxFile bytes (read from its archive, as RepoFS). |
(*Forja) CreateBranch |
method | CreateBranch makes branch start at sha. |
(*Forja) CommitFiles |
method | CommitFiles commits files (any content, as base64) and removals on branch in one commit, and returns its SHA. |
(*Forja) CommitMerge |
method | CommitMerge commits files and removals on branch (whose head must still be head) as a merge of other into it: the result has other among its ancestors and the tree head has with files and removals. |
stillChecking |
func | stillChecking reports whether GitLab is still working out whether a merge request can be merged (merging it then would be refused). |
(*Forja) fileActions |
method | fileActions are the commits API's actions that write files and removals on ref: a file ref lacks is created, executable when it is executable at modes (another commit, "" for none: a file the default branch brings keeps its mode there). |
(*Forja) executable |
method | executable reports whether a file is executable at ref (false when GitLab does not say). |
(*Forja) treeActions |
method | treeActions are the commits API's actions that make from's tree into to's: GitLab's straight compare of the two, each file as it is at to, with its mode. |
Project |
struct | Project is a project the connection can make apps of. |
(*Forja) Projects |
method | Projects lists the projects the connection maintains (where it may add a webhook), the most recently active first, up to 300. |
(*Forja) EnsureHook |
method | EnsureHook adds the project's webhook to rendimiento (pushes and merge requests, with the connection's token), or brings the one there up to date: rendimiento does it for the person when an app is created. |
internal/gitlab/webhook.go¶
146 lines
| Name | Kind | Summary |
|---|---|---|
(*Forja) ParseWebhook |
method | ParseWebhook checks a delivery's X-Gitlab-Token against each connection's webhook token (in constant time) and reads the events rendimiento acts on: a push to a branch (Push Hook) and a merge request opened, reopened, closed or merged (Merge Request Hook). |
(*Forja) deliveredBy |
method | deliveredBy is the connection whose webhook token a delivery carries. |
parseWebhook |
func | parseWebhook reads a delivery of connection c, already checked. |
gitlabTime |
func | gitlabTime reads a webhook's time: "2026-11-19 10:00:00 UTC", or RFC 3339. |
internal/gitlab/escribir_test.go¶
182 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestWritingOnABranch |
func | |
TestRenovateAccess |
func | |
TestTokenRefreshOneAtATime |
func |
internal/gitlab/gitlab_test.go¶
425 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestWebhookToken |
func | |
TestWebhookEvents |
func | |
TestStatusState |
func | |
TestStatusesAndMerges |
func | |
TestTokenRefresh |
func | |
TestSignIn |
func | |
TestNormalizeURL |
func | |
TestSays |
func |
internal/gitlab/mezcla_test.go¶
439 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCommitMergeOnGitLab |
func | GitLab writes no commit with two parents: CommitMerge makes the merge through a merge request whose sides have the same tree, so it merges clean, and the default branch is merged into the branch. |
TestCommitMergeOnAFastForwardProject |
func | A project that merges only by fast-forward or rebase cannot take the merge request: CommitMerge says so before writing anything. |
internal/i18n¶
Package i18n translates the platform's messages for people: the API's answers to a Spanish browser, and alert emails.
internal/i18n/es.go¶
974 lines
internal/i18n/i18n.go¶
213 lines
| Name | Kind | Summary |
|---|---|---|
Lang |
type | Lang is a language the platform speaks. |
M |
func | M formats a message for people. |
pattern |
struct | pattern is one catalog entry, compiled to match finished messages. |
verbs |
func | verbs finds the verbs of a format, skipping literal percent signs (%%). |
compile |
func | compile prepares the catalog once: messages without verbs are looked up as they are; the others become patterns (verbs match any text), tried longest first, so a specific message wins over a general one. |
Translate |
func | Translate returns msg in lang. |
sprintfStrings |
func | sprintfStrings formats the Spanish format with values captured as text: every verb becomes %s, so numbers keep the form they had. |
TranslateExact |
func | TranslateExact translates only a message the catalog has word for word, never through a pattern. |
TranslateLabel |
func | TranslateLabel translates a short label (a name, a title): word for word, or through a pattern with enough fixed text of its own. |
(Lang) T |
method | T translates when the language is Spanish; a shorthand for handlers. |
internal/i18n/idioma.go¶
95 lines
| Name | Kind | Summary |
|---|---|---|
Parse |
func | Parse reads a language setting ("es", "en") or an Accept-Language header: the first language in the header's order of preference (q) that is Spanish or English; English when there is none. |
preferred |
func | preferred is the first Spanish or English language of an Accept-Language list, by its q values (equal ones keep their order); false when the list names neither. |
ForCountry |
func | ForCountry is the language for a visitor from a country: Spanish for the Spanish-speaking ones, else English. |
CountryDefault |
func | CountryDefault is the language of the country Cloudflare says the request comes from (CF-IPCountry), for a browser whose languages are neither Spanish nor English. |
FromRequest |
func | FromRequest is the language to answer a request in: the first Spanish or English language the browser asks for (Accept-Language, which the web UI sets to the language chosen with its switch); else, for a browser that asks for other languages only, its country's (CountryDefault); else English. |
internal/i18n/i18n_test.go¶
99 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCatalog |
func | Every format the platform passes to M has its Spanish, with as many values; a new message without a translation fails here. |
TestTranslate |
func | |
TestParse |
func |
internal/i18n/idioma_test.go¶
57 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestParseOrder |
func | |
TestFromRequest |
func | The browser's languages decide; the country only when they are neither Spanish nor English; a request without Accept-Language (a crawler) stays English wherever it comes from. |
internal/ia¶
Package ia is the AI gateway: every call the platform makes to a model goes through it.
internal/ia/clients.go¶
199 lines
| Name | Kind | Summary |
|---|---|---|
modelClient |
interface | modelClient is one way to reach a model: text, tokens in and out. |
post |
func | post sends JSON and decodes the JSON answer, with the API's message on an error status. |
ollama |
struct | ollama is the local model, through Ollama's chat API (thinking off: the platform's questions are short). |
(ollama) complete |
method | |
anthropic |
struct | anthropic is Anthropic's Messages API. |
(anthropic) complete |
method | A model that thinks first (Haiku 5.5 and later do by default) can spend all of max_tokens thinking and write nothing; it is asked once more, told to think little, with room for twice the tokens. |
(anthropic) call |
method | |
openai |
struct | openai is any OpenAI-compatible chat completions API (OpenAI, and the many services that speak it). |
(openai) complete |
method | |
ProbeLocal |
func | ProbeLocal asks an Ollama at url which models it holds, to tell before saving it whether it answers and has the model wanted. |
internal/ia/herramientas.go¶
218 lines
| Name | Kind | Summary |
|---|---|---|
Tool |
struct | Tool is a tool a model may call: its name, what it does, and its input's JSON schema. |
Turn |
struct | Turn is one turn of a conversation with tools, as Anthropic content blocks: a model's turn is kept exactly as it came back (its thinking included), and the next user turn carries the tools' results. |
ToolCall |
struct | ToolCall is a model asking to run a tool. |
ToolResult |
struct | ToolResult is what a tool answered, for the next user turn. |
ToolRequest |
struct | ToolRequest is a turn of a conversation with tools. |
ToolResponse |
struct | ToolResponse is the model's turn: its content to keep in the conversation, the text in it, the tools it asked for, and why it stopped (end_turn, tool_use, max_tokens, refusal). |
(*Gateway) CompleteTools |
method | CompleteTools asks the organization's Anthropic model one turn of a conversation with tools, within its caps, and records the call. |
usage |
struct | usage is what a call read and wrote, with what came from the cache. |
(anthropic) tools |
method | tools is one turn with tools. |
UserText |
func | UserText is a user turn of plain text. |
UserResults |
func | UserResults is a user turn with tools' results. |
Passing |
func | Passing is passing, for callers that try again on their own after the gateway's tries (the coding agent, with longer pauses). |
passing |
func | passing says whether an error is one that goes away by itself: the connection dropped or timed out, or the API answered that it is busy (429, 5xx, 529 overloaded). |
internal/ia/ia.go¶
317 lines
| Name | Kind | Summary |
|---|---|---|
Message |
struct | Message is one turn of a conversation: role user or assistant. |
Request |
struct | Request is what to ask a model. |
Response |
struct | Response is a model's answer and what it cost. |
Store |
interface | Store is what the gateway keeps and reads (the platform's store). |
Keys |
interface | Keys holds organizations' own API keys (never in the database). |
Gateway |
struct | Gateway is the AI gateway. |
(*Gateway) SetPlatformKey |
method | SetPlatformKey makes the gateway use another platform key from now on, without a restart (a key changed on the Environment page). |
(*Gateway) PlatformKeyNow |
method | PlatformKeyNow is the platform's key in use ("" when there is none). |
ProbarLlave |
func | ProbarLlave asks Anthropic, with key, for the model the platform uses (GET /v1/models/{model}): it answers only when the key works and can use that model, and it costs nothing. |
(*Gateway) LocalNow |
method | LocalNow is the local model's Ollama and model now ("" address: there is no local model). |
Price |
struct | Price is a model's price in millionths of a dollar per million tokens. |
(*Gateway) cost |
method | cost is a call's price, rounded up to the next millionth of a dollar. |
(*Gateway) Price |
method | Price is what in and out tokens of a model cost, in millionths of a dollar (what an estimate of work is priced at). |
(*Gateway) clock |
method | |
(*Gateway) http |
method | |
target |
struct | target is where a call goes and who pays. |
(*Gateway) choose |
method | choose picks the organization's provider, or the local model with the reason when that one cannot be used (no key, a cap reached). |
(*Gateway) Complete |
method | Complete asks a model for an organization, from source (a feature, or an agent key's name), and records the call. |
(*Gateway) CompleteVia |
method | CompleteVia asks a given provider for the organization (own or platform: an escalation to a stronger model) instead of the one it chose, with the same caps and the same fall back to the local model. |
(*Gateway) complete |
method | |
(*Gateway) call |
method | call asks one target and records it. |
Dollars |
func | Dollars writes millionths of a dollar as dollars: $0.15, $5.00. |
or |
func |
internal/ia/keys.go¶
63 lines
| Name | Kind | Summary |
|---|---|---|
SecretKeys |
struct | SecretKeys keeps each organization's own AI key in a Secret of the platform's namespace (rendimiento-ia-org- |
secretName |
func | |
(SecretKeys) OrgKey |
method | OrgKey is the organization's key ("" when it has none). |
(SecretKeys) KeyHint |
method | KeyHint is the key's last four characters, for the UI ("" when none). |
(SecretKeys) SetOrgKey |
method | SetOrgKey stores the organization's key; an empty one removes it. |
internal/ia/herramientas_test.go¶
85 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCompleteTools |
func | A turn with tools goes to the organization's Anthropic key with the tools, the conversation and caching; the model's turn comes back whole (thinking included) with the tools it asked for, priced with what came from the cache. |
TestCompleteToolsTriesAgain |
func | A dropped connection or a busy API is tried again; a real error is not. |
internal/ia/ia_test.go¶
220 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestGateway |
func | The local model by default; an organization's own key until its cap; the platform's key within the operator's allowance and the platform's cap; the local model whenever one of those cannot be used, with the reason. |
TestDollars |
func | |
TestCompleteVia |
func | Asking a given provider (an escalation) uses it within its caps, and falls back to the local model like any call. |
TestAnthropicAsksAgainAfterThinkingOnly |
func |
internal/ia/local_test.go¶
44 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestLocalModel |
func | The local model saved on the AI page wins over the environment's, and an Ollama is asked which models it holds before it is saved. |
internal/libreta¶
Package libreta is an app's notebook (Ruta 150): what was asked for the app and whether it is done.
internal/libreta/libreta.go¶
544 lines
| Name | Kind | Summary |
|---|---|---|
Open |
func | Open reports whether a state is still open (not done or set aside). |
Done |
func | Done reports whether a state is done. |
Entry |
struct | Entry is a Ruta entry about the app: a to-do or a decision. |
Kept |
struct | Kept is what was written down of a branch: when it was merged and the release that carried it (0 while none has). |
Encargo |
struct | Encargo is an encargo about the app. |
Pull |
struct | Pull is a pull request of the app's repository. |
Run |
struct | Run is a run of the app. |
Release |
struct | Release is a release of the app, with its verification. |
Tests |
struct | Tests are the app's own tests that only report yet: each one blocks once it passes BlockAfter releases in a row. |
Input |
struct | Input is everything a libreta is made of. |
Progress |
struct | Progress is how far a waiting line has gone. |
Item |
struct | Item is one line of the libreta. |
Libreta |
struct | Libreta is the app's notebook: open lines first, newest first, then the done and set-aside ones, most recently finished first. |
branchState |
struct | branchState is what one branch says of the line it belongs to. |
book |
struct | |
Build |
func | Build makes the libreta. |
finished |
func | finished is when a done or set-aside line ended (when it was asked, if that is not known). |
(*book) seen |
method | seen reports whether anything is known of a branch: a run or a pull request. |
(*book) best |
method | best is what the most advanced of the branches says (false when none is known). |
(*book) state |
method | state is what one branch says: its pull request, its last run, whether it was merged and in which release it went out. |
(*book) keptState |
method | keptState is what a branch says from what was written down of it: it was merged then, and went out in its release, or (while none is kept) in the one the releases now say. |
(*book) published |
method | published finds the release a merged branch went out in: the first one made by a run of the default branch created after the merge (so it holds it) whose verification passed. |
(*book) apply |
method | apply puts what a branch says on a line. |
internal/libreta/libreta_test.go¶
216 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestStates |
func | |
TestRenovateClaimed |
func | A Renovate pull request an encargo already speaks for is not repeated. |
TestUnseenBranch |
func | An encargo's branch by name counts only once it is seen (a run or a pull request); a branch named by hand on a Ruta entry counts at once. |
TestKept |
func | What was kept of a branch (its merge, its release) speaks for it when its runs and its pull request are gone, and before what they say now. |
internal/llaves¶
Package llaves changes the keys the platform talks to other services with, from the Environment page (Llaves y ajustes), while it runs: the Cloudflare token, the email (Resend) key, the platform's AI key, the log archive's S3 key and the Umami user.
internal/llaves/llaves.go¶
688 lines
| Name | Kind | Summary |
|---|---|---|
Secreto |
struct | Secreto is a platform's own Secret and the keys in it that make one of its keys: the environment variables the platform reads at start (envFrom). |
ConUsuario |
func | ConUsuario says whether a key is two values: who, and its secret. |
Valores |
type | Valores are a key's values, by the key of its Secret (LOG_ARCHIVE_ACCESS_KEY, ...). |
(Valores) completos |
method | completos: every value of the key is there. |
Nueva |
struct | Nueva is a new key as it is pasted: its secret and, for a key of two values, who (Usuario). |
(Nueva) valores |
method | valores are n's values, by the keys of id's Secret. |
Destino |
struct | Destino is where a key's value is kept: one key of a Secret. |
(Destino) String |
method | |
Paso |
struct | Paso is one step of a change: a test against the service, saving the value, using it. |
Resultado |
struct | Resultado is how a change went: every step tried, in order (they stop at the first that fails), and whether the new key was saved. |
Anotador |
interface | Anotador keeps who changed which key and when (store.Store). |
Cambiador |
struct | Cambiador tests a new key, saves it where it is used and makes the platform use it. |
(*Cambiador) Disponible |
method | Disponible says why a key cannot change here now ("" when it can): it changes a service the platform already uses, set up when it was installed. |
(*Cambiador) Cambiar |
method | Cambiar tests n as the new key id and, only when every test passes, saves it and uses it. |
(*Cambiador) http |
method | |
(*Cambiador) probarCloudflare |
method | probarCloudflare: Cloudflare accepts the token and says until when, it sees every zone in use, and it can create and delete a record. |
(*Cambiador) probarCorreo |
method | probarCorreo: Resend accepts the key (asking for its domains, which sends nothing); its account has the domain emails come from; and, only when asked, a test email goes out with it. |
dominioDe |
func | dominioDe is the domain of an address such as "rendimiento alerts@example.com". |
(*Cambiador) probarIA |
method | probarIA: Anthropic answers with the key, for the platform's model. |
(*Cambiador) probarArchivo |
method | probarArchivo: the log archive's S3 accepts the key, its bucket is there, and the key can write, read back and delete a small object in it. |
probarObjeto |
func | probarObjeto writes a small object, reads it back and deletes it: a key that may only read, or only write, does not pass. |
(*Cambiador) probarUmami |
method | probarUmami: Umami lets the user in, and the user sees websites (a view-only user is enough). |
(*Cambiador) Destinos |
method | Destinos are the Secrets a key is written to: the platform's own, and for Cloudflare also the one the ClusterIssuer's DNS-01 solvers read (apiTokenSecretRef), in cert-manager's namespace. |
(*Cambiador) guardar |
method | guardar writes the values to every destino, or to none: when one Secret cannot be written, the ones written before it get their old values back. |
(*Cambiador) devolver |
method | devolver puts a Secret's keys back as they were before a change that could not be finished (nuevo: the change made the Secret). |
Leer |
func | Leer reads a key's values from the platform's own Secret ("" for those not there), for the processes that follow a change. |
ZonasUsadas |
func | ZonasUsadas are the zones (of those the DNS provider knows) that hold a host in hosts, plus zona (DNS_ZONE) when set: what a new token must see. |
internal/llaves/recargador.go¶
108 lines
| Name | Kind | Summary |
|---|---|---|
Versiones |
interface | Versiones are the keys changed and their versions (store.Store). |
Recargador |
struct | Recargador makes one process of the platform follow the keys changed on the Environment page, with no restart: every 15 seconds it looks at their versions in the database, and for each one newer than the one it uses it reads the value from its Secret and hands it to Aplicar (the DNS provider, the email sender, the AI gateway, the log archive, Umami). |
(*Recargador) Revisar |
method | Revisar follows the keys changed since the last look. |
(*Recargador) Usar |
method | Usar uses a key just changed in this process, at once. |
(*Recargador) marcar |
method | |
(*Recargador) Run |
method | Run looks every 15 seconds until ctx ends. |
internal/llaves/llaves_test.go¶
459 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCloudflareSeGuardaCuandoPasaTodo |
func | A good Cloudflare token: accepted, it sees every zone in use, it makes and deletes a test record; then it is written to the platform's secret and the issuer's, recorded with its expiry, and used at once. |
TestCloudflareNoSeGuardaSiFalla |
func | Any test that fails saves nothing: the secrets keep the token before, nothing is recorded, this process does not change, and the answer says which step failed and why. |
TestCloudflareAmbosONinguno |
func | When the issuer's secret cannot be written, the platform's gets its old token back: both or neither. |
TestCorreo |
func | A new email key is checked without sending anything, unless a test email is asked for; a bad one is not saved. |
TestIA |
func | The AI key is proved by asking Anthropic for the platform's model. |
TestRecargador |
func | Another process follows a change within one look: it reads the new value from the secret once per version, and keys it does not use are left. |
TestDisponible |
func | A key changes here only where the platform uses that service already. |
TestZonasUsadas |
func |
internal/llaves/respaldos_test.go¶
297 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestArchivo |
func | The log archive's new key passes when the bucket is there and it can write, read back and delete an object: then both values are saved, in one write, and used at once. |
TestUmami |
func | A new Umami user is saved only when Umami lets it in and it sees the websites; the user name and password go to the secret together. |
TestRecargadorDosValores |
func | Another process follows a changed log archive key only once both values are in its secret. |
internal/logarchive¶
Package logarchive moves the step logs of finished CI runs out of Postgres into object storage (MinIO or any S3), gzip-compressed, and reads them back for the UI.
internal/logarchive/logarchive.go¶
245 lines
| Name | Kind | Summary |
|---|---|---|
Objects |
interface | Objects stores and fetches whole objects (MinIO in production). |
Store |
interface | Store is what the archiver needs from the database. |
Archive |
struct | Archive moves finished runs' step logs to Objects every Every. |
(*Archive) Run |
method | Run sweeps until ctx is done. |
(*Archive) Sweep |
method | Sweep archives the logs of finished runs, in batches, until none are left or one fails. |
Key |
func | Key is a step log's object key. |
(*Archive) Read |
method | Read returns an archived log's text. |
compress |
func | compress gzips a log as small as it goes. |
MinIO |
struct | MinIO stores objects in one bucket of a MinIO (or other S3) server. |
NewMinIO |
func | NewMinIO connects to endpoint (host:port) with an access key. |
(*MinIO) SetKeys |
method | SetKeys makes every request from now on use another access key (a key changed on the Environment page), with no new client. |
cambiantes |
struct | cambiantes are credentials that change while the client runs: they are read again for every request, which costs nothing. |
(*cambiantes) set |
method | |
(*cambiantes) Retrieve |
method | |
(*cambiantes) RetrieveWithCredContext |
method | |
(*cambiantes) IsExpired |
method | |
(*MinIO) Put |
method | Put uploads one object. |
(*MinIO) Get |
method | Get downloads one object; ErrExpired when it no longer exists. |
(*MinIO) EnsureRetention |
method | EnsureRetention checks the bucket exists and sets its rule: logs under Prefix are deleted days after they were archived. |
internal/logarchive/logarchive_test.go¶
104 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestSweepStopsWithoutProgress |
func | A sweep that cannot mark anything stops instead of uploading forever. |
TestSweepAndRead |
func |
internal/marcador¶
Package marcador is the scoreboard of a day's summary: the day's totals from each app's numbers, the runs by hour, and the day's lotería card, the one most notable thing.
internal/marcador/marcador.go¶
102 lines
| Name | Kind | Summary |
|---|---|---|
Card |
struct | Card is the day's lotería card: which one, its number, and the app it is about ("" for the organization). |
Board |
struct | Board is a day's scoreboard. |
Build |
func | Build adds up the apps (those the reader may see) and picks the card. |
(Board) card |
method | card is the most notable thing of the day, in this order: what went wrong in production, a day of many failures, releases all healthy, releases at night, and work waiting for a review. |
internal/marcador/marcador_test.go¶
50 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestBuild |
func | November 12: seven healthy releases of rendimiento-ai, a tough afternoon of tests, four problems; stockpulse and jobsentry at night. |
internal/mercado¶
Package mercado makes web pages for people who don't write code.
internal/mercado/mercado.go¶
273 lines
| Name | Kind | Summary |
|---|---|---|
Mercado |
struct | Mercado opens and keeps the pages. |
Abrir |
struct | Abrir is the form's first answers: the page and its address. |
(*Mercado) Abrir |
method | Abrir opens a new page: a repository in Org with the page, its rendimiento.yaml and its Dockerfile, registered as an app. |
(*Mercado) Leer |
method | Leer reads a page from its repository's default branch. |
(*Mercado) Guardar |
method | Guardar saves a changed page as one commit: its HTML and answers, new photos, and without the photos it no longer uses. |
(*Mercado) dominioLibre |
method | dominioLibre checks that a page can be published at dominio: under one of the zones, and not taken by another app. |
enZona |
func | enZona tells whether dominio is one word (an app's name) under one of zones. |
especificacion |
func | especificacion is a page's rendimiento.yaml: one small static service. |
archivos |
func | archivos are the files a commit of the page writes. |
readme |
func | readme is the README of a page's repository: what each file is, and that the form rewrites index.html on every save. |
enIdioma |
func | enIdioma picks the words the page's owner reads in GitHub (its commits and description), in the page's language. |
internal/mercado/pagina.go¶
234 lines
| Name | Kind | Summary |
|---|---|---|
Paleta |
struct | Paleta is a page's colors, from the Cotija palette: the awning, the headings and the buttons. |
Pagina |
struct | Pagina is everything the form asks, saved as pagina.json. |
Detalle |
struct | Detalle is one labelled fact: Horario, Dirección, Fecha, Lugar… |
Enlace |
struct | Enlace is a way to reach the owner: a username, a number, an email or an address. |
(*Pagina) Default |
method | Default fills what the form may leave out. |
(*Pagina) Validate |
method | Validate checks a defaulted page. |
(Enlace) Href |
method | Href is the link an Enlace becomes. |
contains |
func | contains reports whether v is in list. |
boolInt |
func | boolInt is 1 for true, 0 for false. |
internal/mercado/render.go¶
240 lines
| Name | Kind | Summary |
|---|---|---|
textos |
struct | Textos are the page's own labels, in its language, by kind of page. |
enlaceVista |
struct | |
vista |
struct | |
bandera |
struct | bandera is one flag of the papel picado across the top of the page. |
fotoURL |
func | fotoURL is where the page loads a photo from: a data: URL as it came from the form (the preview), or a path of the repository, relative to base ("" on the published page, the site's address in a preview). |
Render |
func | Render turns a page into its HTML. |
lastSegment |
func | lastSegment is what follows the last / (a profile name in a link). |
banderas |
func | banderas strings the papel picado: fourteen flags in the page's colors and the rest of the Cotija palette. |
Fotos |
func | Fotos takes the photos just added in the form (data: URLs) out of the page: it returns them as files of the repository, named by their content, and leaves their paths in the page. |
fotosDe |
func | fotosDe lists the repository photos a page uses. |
internal/mercado/tools.go¶
72 lines
| Name | Kind | Summary |
|---|---|---|
PuestoBrief |
struct | PuestoBrief is a stall as the agents' MCP tools list it. |
(*Mercado) Puestos |
method | Puestos lists the stalls, most recently changed first. |
(*Mercado) puesto |
method | puesto finds a stall's app by its name; an app that is not a stall is not the Mercado's to change. |
(*Mercado) LeerPuesto |
method | LeerPuesto reads a stall's page by the stall's name. |
(*Mercado) GuardarPuesto |
method | GuardarPuesto saves a stall's changed page by the stall's name (see Guardar). |
internal/mercado/mercado_test.go¶
190 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestEnlaces |
func | |
TestValidate |
func | |
TestRenderEscapes |
func | |
TestFotos |
func | |
TestArchivos |
func | |
TestEnZona |
func |
internal/mesa¶
Package mesa is an app's work board: each line of work (a branch with its pull request, its last run and the encargos about it, or an encargo with no branch) with how it stands and who it waits for.
internal/mesa/mesa.go¶
363 lines
| Name | Kind | Summary |
|---|---|---|
Pull |
struct | Pull is a pull request as the board needs it. |
Run |
struct | Run is a run of the app. |
Heads |
struct | Heads is what GitHub says of the repository's branches now: the commit each one points at, and which commits are already in the default branch. |
Encargo |
struct | Encargo is an encargo about the app. |
Line |
struct | Line is one line of work. |
LineEncargo |
struct | LineEncargo is an encargo on a line. |
Board |
struct | Board is the work board, its lines sorted by group then newest first. |
(Board) You |
method | You counts the lines that wait for a person. |
LinkBranch |
func | LinkBranch is the branch a link names on GitHub ("pull/new/ |
LinkPull |
func | LinkPull is the number of the pull request a link names, or 0. |
line |
struct | |
Build |
func | Build makes the board from the app's pull requests (the most recently updated first), its recent runs (any order) and its open encargos. |
(*line) judge |
method | judge says where a branch's line goes, and false when it is not on the board (closed, or merged more than a day ago). |
internal/mesa/mesa_test.go¶
139 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestBuild |
func | |
TestBuildEmpty |
func | |
TestBuildHeads |
func | With GitHub's branches known, a branch that is gone leaves the board, and one whose commit is already in main (merged with another built on it) is merged, today or not at all. |
internal/mezcla¶
Package mezcla joins two versions of a file changed from a common base, the way git's three-way merge does, for whoever merges without git: the coding agent, which has no shell.
internal/mezcla/mezcla.go¶
144 lines
| Name | Kind | Summary |
|---|---|---|
hunk |
struct | hunk is one change of a side against the base: base lines [from, to) become lines. |
hunks |
func | |
sameHunk |
func | |
before |
func | before: change a ends before b starts, with a base line between them that neither touches. |
Merge |
func | Merge joins ours and theirs, both changed from base. |
apply |
func | apply is base lines [from, to) with a side's changes in that place. |
appendEnded |
func | appendEnded adds lines, the last one ended with "\n" so a mark that follows starts a line of its own. |
HasMarks |
func | HasMarks says a file still has a conflict's marks, at the start of a line. |
splitLines |
func |
internal/mezcla/mezcla_test.go¶
32 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestMerge |
func |
internal/motor¶
Package motor runs containers on one machine, through the command line of containerd (nerdctl) or Docker: both take almost the same commands, so one implementation serves either without their libraries.
internal/motor/motor.go¶
394 lines
| Name | Kind | Summary |
|---|---|---|
Motor |
struct | Motor runs containers with one command-line tool. |
Buscar |
func | Buscar finds the machine's engine: nerdctl first, then docker. |
(*Motor) Recomendado |
method | Recomendado reports whether this is the recommended engine (containerd). |
Montaje |
struct | Montaje is a named volume, or a folder of this machine (an absolute path), mounted in a container. |
Contenedor |
struct | Contenedor is one container to run. |
(Contenedor) args |
method | |
sortedKeys |
func | |
(*Motor) run |
method | |
(*Motor) Correr |
method | Correr runs the container to the end, its output to w, and removes it. |
sinAviso |
struct | sinAviso drops containerd's notice that a named volume already exists, which it prints each time one is mounted. |
(*sinAviso) Write |
method | |
(*Motor) Iniciar |
method | Iniciar starts the container in the background (Quitar removes it). |
(*Motor) Asegurar |
method | Asegurar starts the container unless one by that name is already there (running, or stopped and started again). |
(*Motor) Ejecutar |
method | Ejecutar runs a command in a running container, and fails when it does. |
(*Motor) Salida |
method | Salida runs a command in a running container and returns what it wrote. |
(*Motor) Quitar |
method | Quitar stops and removes a container, with the anonymous volumes its image made (Postgres's data); one that is not there is gone already. |
(*Motor) CrearVolumen |
method | CrearVolumen makes a named volume (an existing one is kept). |
(*Motor) Volumenes |
method | Volumenes lists the named volumes with this label (key=value). |
(*Motor) CrearRed |
method | CrearRed makes a network for a group of containers, which reach each other there by name (an existing one is kept). |
(*Motor) QuitarRed |
method | QuitarRed removes a network; one that is not there is gone already. |
(*Motor) Nombres |
method | Nombres lists the containers, running or not, with this label (key=value). |
Info |
struct | Info is what the engine says of a container. |
(*Motor) Inspeccionar |
method | Inspeccionar reads a container's state and labels. |
(*Motor) Registros |
method | Registros is the last lines a container wrote ("" when it cannot be read). |
(*Motor) Reiniciar |
method | Reiniciar restarts a container. |
(*Motor) Detener |
method | Detener stops a container and keeps it, to start it again later (while rendimiento sleeps); one that is not there or not running is stopped. |
(*Motor) Arrancar |
method | Arrancar starts a stopped container again. |
(*Motor) QuitarVolumen |
method | QuitarVolumen removes a named volume; one that is not there is gone already. |
Salida |
func | Salida is the exit code of a failed command, when the engine said it. |
internal/motor/motor_test.go¶
96 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCorrer |
func | A container's command replaces its image's entrypoint, as in a pod; the download is quiet; containerd's notice about existing volumes is dropped from its output, and a last line without a newline is kept. |
TestAsegurar |
func | A platform's own container is started once, published and restarted with the machine; one already there is only started. |
TestAsegurarOtraVez |
func | A start that fails while containerd is starting the container itself is tried again; one that keeps failing says what the tool said. |
TestAlias |
func | A container's alias: its hostname, which nerdctl puts in the hosts of its network; Docker also gets it as a network alias. |
internal/notify¶
Package notify emails the platform's owner about what needs attention: releases rolled back by verification, failed runs on the default branch, outages and recoveries.
internal/notify/notify.go¶
474 lines
| Name | Kind | Summary |
|---|---|---|
Tone |
type | Tone is a message's severity: it sets its color and label. |
Fact |
struct | Fact is one row of a message's details table. |
Message |
struct | Message is one notification. |
Sender |
interface | Sender delivers a rendered email. |
Notifier |
struct | Notifier renders messages and sends them, de-duplicated and rate-limited. |
(*Notifier) Enabled |
method | Enabled reports whether messages are actually sent. |
(*Notifier) Notify |
method | Notify sends m in the background (a slow mail API never delays the caller); a message with a Group waits GroupWait for others of its group, and they go out as one email. |
(*Notifier) flush |
method | flush sends a group's waiting messages: one as it is, several as one email. |
(*Notifier) sendLater |
method | sendLater sends m in the background, within the hourly cap. |
(*Notifier) fresh |
method | fresh drops a message whose key was sent within Cooldown (30 minutes by default), and every message when notifications are off. |
(*Notifier) underCap |
method | underCap keeps a bad night from flooding the inbox: 20 emails an hour in all, by default (a grouped email counts once). |
Combine |
func | Combine makes one email of several notices of a group: the most severe tone, the first subject "and N more", and one row per notice (its title and summary), with their details one after another. |
(*Notifier) Send |
method | Send renders and sends m now, without de-duplication (the test email). |
Localize |
func | Localize translates a message's text for people into lang: subject, title, summary, facts, details (line by line) and the action. |
Render |
func | Render returns m as an email-safe HTML page and as plain text, in English. |
render |
func | render is an email's subject and HTML in a language, in the tone's colors. |
Resend |
struct | Resend sends email through Resend's HTTP API (https://resend.com). |
(*Resend) SetKey |
method | SetKey makes the sender use another API key from now on, without a restart (a key changed on the Environment page). |
(*Resend) key |
method | |
CheckResendKey |
func | CheckResendKey asks Resend, with key, for its domains (GET /domains), which sends nothing: a full-access key lists them, and a key that may only send is refused as restricted, which proves it is valid too. |
(*Resend) Send |
method | Send posts one email to Resend. |
internal/notify/notify_test.go¶
178 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestRender |
func | |
TestNotifierDedupAndCap |
func | |
TestResend |
func | |
TestOnSent |
func | |
TestNotifierGroups |
func | Like Alertmanager's group_wait: notices of one group that arrive together go out as one email; other groups and ungrouped notices are not held back. |
TestCombine |
func |
internal/pgprueba¶
Package pgprueba gives each test a Postgres database of its own, a copy of one migrated once for the whole package (CREATE DATABASE … TEMPLATE).
internal/pgprueba/pgprueba.go¶
138 lines
| Name | Kind | Summary |
|---|---|---|
Migrar |
type | Migrar applies every migration to the database dsn names. |
Base |
func | Base returns the DSN of a new database for this test: a copy of |
hacerPlantilla |
func | |
conBase |
func | conBase is dsn with another database of the same server. |
quoteIdent |
func | quoteIdent quotes a database name for SQL. |
internal/pgprueba/pgprueba_test.go¶
20 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestConBase |
func |
internal/pipeline¶
Package pipeline plans and executes CI runs.
internal/pipeline/arreglo.go¶
383 lines
| Name | Kind | Summary |
|---|---|---|
FixJob |
struct | FixJob is one declared fix to run (see internal/arreglos): the command, in an image, in a folder of the branch checked out at a commit, with the caller's uncommitted files on top. |
FixChange |
struct | FixChange is a file the command changed: its content, or that it is gone. |
FixOutput |
struct | FixOutput is what a fix's pod sent back: every file it changed under the fix's folder (Changes holds the content of those that may match its patterns; Others the paths of the rest), or why it failed. |
(*KubeExecutor) Fix |
method | Fix runs a declared fix as a pod in the build namespace: the clone of the commit, the uncommitted files laid over it, the command (in its image, without the app's secrets or environment: CI=true is all it gets), and then a container that sends back what it changed. |
(*KubeExecutor) fixPod |
method | fixPod is the pod a fix runs in: clone, apply and the command as init containers, one after another, and collect last. |
pendingTar |
func | pendingTar packs the uncommitted files as a compressed tar. |
ParseFixOutput |
func | ParseFixOutput reads what the collect container wrote. |
limited |
struct | limited writes at most n bytes to w, dropping the rest. |
(*limited) Write |
method |
internal/pipeline/kube.go¶
1192 lines
| Name | Kind | Summary |
|---|---|---|
KubeExecutor |
struct | KubeExecutor runs each step as a pod in a dedicated namespace. |
(*KubeExecutor) caches |
method | caches is how many caches each test keeps now. |
(*KubeExecutor) defaults |
method | defaults fills the images and timeout left unset. |
podName |
func | podName is a step's pod name: run- |
randSuffix |
func | randSuffix is 5 random hex characters, so a retried step gets a new pod name. |
(*KubeExecutor) Cleanup |
method | Cleanup removes pods and clone secrets left by a previous process. |
(*KubeExecutor) Execute |
method | Execute runs one step as a pod: a clone secret with a short-lived token, the pod (clone, plan, then the step), its logs streamed to w, and the digest of a build read from the termination message. |
(*KubeExecutor) buildkitFor |
method | buildkitFor picks the pool daemon for key by rendezvous hashing: each key has a stable favourite among the ready daemons, and only the keys of a daemon that goes away move elsewhere. |
(*KubeExecutor) daemonNode |
method | daemonNode is the node a pool daemon's pod runs on ("" when it cannot tell): its SRV target is |
(*KubeExecutor) pod |
method | pod is the pod a step runs in. |
dockerArgs |
func | dockerArgs passes a build step's build args to the Dockerfile frontend. |
railpackArgs |
func | railpackArgs passes a build step's build args to railpack prepare. |
sortedKeys |
func | |
(*KubeExecutor) withDatabaseAndCache |
method | withDatabaseAndCache adds what a test or task asked for to its pod: the throwaway Postgres (an init container) and the kept /cache volume. |
(*KubeExecutor) testPostgres |
method | testPostgres is the database of a test with postgres: true: a sidecar (an init container that keeps running) that the tests start after, once it accepts connections, and that stops when they end. |
cacheName |
func | cacheName is the volume kept between runs of a test step: one per app, step and slot, e.g. |
(*KubeExecutor) ensureCache |
method | ensureCache creates the step's cache volume the first time it runs. |
(*KubeExecutor) createPod |
method | createPod creates the step's pod, retrying brief API errors. |
unschedulable |
func | unschedulable is the scheduler's reason when it found no node for the pod, or "". |
(*KubeExecutor) stuckOnCache |
method | stuckOnCache waits up to wait for the pod to get a node. |
(*KubeExecutor) freeCache |
method | freeCache is the first of the step's caches (it keeps slots of them) that no other test has; false when every one is taken. |
(*KubeExecutor) waitCacheFree |
method | waitCacheFree waits up to wait for one of the step's caches that no other test has, and says which; false when they are all still taken. |
withoutCache |
func | withoutCache gives a test's pod an empty folder at /cache instead of the cache volume. |
(*KubeExecutor) cacheInUse |
method | cacheInUse says whether a pod other than pod (another run's test) has the step's cache volume (the one of its slot) mounted on a node. |
(*KubeExecutor) deletePod |
method | deletePod deletes a pod and waits until it is gone. |
(*KubeExecutor) dropCache |
method | dropCache deletes the waiting pod and the step's cache volume, and waits until both are gone, so the next pod gets a new volume on whichever node has room. |
(*KubeExecutor) DeleteCaches |
method | DeleteCaches removes the cache volumes of an app's tests. |
sortedEnv |
func | sortedEnv turns a map into environment variables in a fixed order, so the same step always makes the same pod. |
(*KubeExecutor) waitStarted |
method | waitStarted blocks until the container is running or has terminated, failing fast on image pull errors. |
(*KubeExecutor) streamLogs |
method | streamLogs copies a container's log to w as it is written, until the container ends. |
(*KubeExecutor) containerEnded |
method | containerEnded says whether a pod's container (or init container) has terminated. |
(*KubeExecutor) waitDone |
method | waitDone polls the pod every second until it succeeds or fails, or the step's time runs out. |
terminationSummary |
func | terminationSummary says why a pod failed: Kubernetes' reason (e.g. |
(*KubeExecutor) capCPU |
method | capCPU lowers a step's CPU request to the most the Environment page allows; its limit, if any, is left alone, so it still uses free cores. |
(*KubeExecutor) nodesOff |
method | nodesOff are the nodes step pods stay off: BUILD_EXCLUDE_NODES and those the Environment page turned off. |
(*KubeExecutor) avoided |
method | avoided are the nodes that take no runs and those busy now: the ones a BuildKit daemon is not picked from while another is ready. |
(*KubeExecutor) affinity |
method | affinity keeps step pods off the nodes that take no runs, and away from the busy ones when another node has room. |
transientRetry |
func | transientRetry retries API calls that failed for reasons that pass on their own: an overloaded API server (k3s's SQLite datastore answers "database is locked" under heavy I/O), timeouts, throttling. |
isTransient |
func | isTransient reports errors from the API server worth trying again: it is busy, timed out or briefly unavailable (k3s's SQLite says "database is locked"). |
ptr |
func | ptr returns a pointer to a copy of v. |
internal/pipeline/local.go¶
308 lines
| Name | Kind | Summary |
|---|---|---|
LocalExecutor |
struct | LocalExecutor runs each step on this machine, as containers of its engine (containerd or Docker): the parts of a step's pod, one by one, with the same images and scripts. |
(*LocalExecutor) defaults |
method | defaults fills in the images and frontend the cluster's executor uses. |
(*LocalExecutor) Execute |
method | Execute runs one step and removes its containers and workspace. |
(*LocalExecutor) DeleteCaches |
method | DeleteCaches removes the cache volumes of an app's tests. |
(*LocalExecutor) ended |
method | ended turns a container's failure into the step's: cancelled, timed out, or its exit code. |
(*LocalExecutor) startPostgres |
method | startPostgres starts a test's throwaway database and waits until it accepts connections over TCP, as the pod's startup probe does. |
limits |
func | limits is a step's CPU and memory limits in the engine's terms ("1.5", "512m"); "" where it has none. |
lastLine |
struct | lastLine keeps the last lines of a step's output, which its executor reads back (a build's digest). |
(*lastLine) Write |
method | |
(*lastLine) find |
method | find is the last line starting with prefix ("" when none). |
internal/pipeline/plan.go¶
196 lines
| Name | Kind | Summary |
|---|---|---|
Kind |
type | Kind is what a step does: test, build, or run a task. |
Status |
type | Status is a step's state. |
(Status) Done |
method | Done reports whether the step has finished (in any way). |
Step |
struct | Step is one node of the run's DAG. |
TaskStepID |
func | TaskStepID is the ID of a task's step. |
TaskKey |
func | TaskKey is the Service field of a task's step: what change detection and the run page group it by. |
Source |
struct | Source identifies the commit being built. |
Plan |
func | Plan builds the DAG for a spec: per service, its test (if configured) and its build, side by side; job images; the builds (test and build); then tasks, after the builds (and their tests) and tasks they name. |
testStep |
func | testStep is the test of a service or build named name, whose image key is key. |
isTask |
func | isTask reports whether name is a task of the spec. |
hasTest |
func | hasTest reports whether the service or build named name has a test step. |
internal/pipeline/prueba.go¶
103 lines
| Name | Kind | Summary |
|---|---|---|
(*KubeExecutor) PushTestImage |
method | PushTestImage has a BuildKit daemon build a tiny image and push it to image (registry/name:tag), as builds do: the test of a new image registry. |
buildImageOr |
func |
internal/pipeline/run.go¶
175 lines
| Name | Kind | Summary |
|---|---|---|
StepResult |
struct | StepResult is what an executor reports for one step. |
Executor |
interface | Executor runs a single step to completion, writing its logs to w. |
Recorder |
interface | Recorder persists step progress and logs (Postgres + SSE fan-out in production). |
Runner |
struct | Runner executes run DAGs with a global cap on concurrent steps, because builds on Raspberry Pi nodes are CPU and memory bound. |
NewRunner |
func | NewRunner returns a Runner that runs at most maxParallel steps at a time across all runs. |
(*Runner) Run |
method | Run executes steps respecting DependsOn and returns each step's result. |
validate |
func | validate rejects unknown dependencies and cycles. |
internal/pipeline/task.go¶
165 lines
| Name | Kind | Summary |
|---|---|---|
(*KubeExecutor) taskSecrets |
method | taskSecrets reads the secrets a task step uses from its app's namespace. |
maskSecrets |
func | maskSecrets replaces secret values in a task's log with ***. |
maskingWriter |
struct | |
(*maskingWriter) Write |
method | Write masks p and passes it on, reporting all of p as written. |
(*maskingWriter) Close |
method | Close closes the underlying writer when it is a closer (the step's log). |
taskResources |
func | taskResources turns a size preset (with its overrides) into requests and limits. |
internal/pipeline/arreglo_test.go¶
85 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestFixPod |
func | A fix's pod: the clone, the uncommitted files laid over it, the command (in its image, in its folder, with nothing of the app's), and collect. |
TestParseFixOutput |
func | What collect writes is read back: the files it sent, the deleted, and the others listed; a cut output is an error. |
internal/pipeline/buildkit_test.go¶
34 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestBuildkitSkipsNodesOff |
func | An image whose favourite daemon is on a node that takes no runs builds on another one; with every daemon's node off, the pool is used as it is. |
internal/pipeline/cache_test.go¶
88 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestWithoutCache |
func | A test that goes without its cache gets an empty folder at /cache, and keeps its other volumes. |
TestWaitCacheFree |
func | A test waits for another run's test to let the cache go, up to a limit. |
TestCacheNameOfSlot |
func | The first cache keeps the name it always had; the others add their number. |
TestCachesCount |
func | Without a number from the Environment page a test keeps DefaultCaches, and never more than MaxCaches. |
internal/pipeline/capacidad_test.go¶
54 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCapacityLimits |
func | The Environment page lowers what a step asks for, never what it may use, and adds nodes that take no runs to BUILD_EXCLUDE_NODES. |
internal/pipeline/kube_integration_test.go¶
130 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestBuildOnCluster |
func | TestBuildOnCluster clones a public Go repo, builds it with the cluster's buildkitd and pushes it to the registry. |
TestRailpackBuildOnCluster |
func | TestRailpackBuildOnCluster builds a repo without using its Dockerfile: the railpack CLI writes a plan and BuildKit's railpack frontend builds it. |
internal/pipeline/local_real_test.go¶
66 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestLocalReal |
func | TestLocalReal runs real steps on this machine's engine, against public repositories. |
internal/pipeline/local_test.go¶
127 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestLocalTest |
func | A test runs in its image after the clone, with its Postgres sharing its network and its cache volume, and everything is removed after. |
TestLocalBuild |
func | A build pushes with buildctl on the host's network and reads its digest from the last line; without it, the step fails. |
TestLocalFailures |
func | A failing step, a failing clone and a task with secrets fail with a reason. |
internal/pipeline/logs_test.go¶
27 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestContainerEnded |
func | A container is done when its status says it terminated, or its pod is gone; a log stream left open after that is closed. |
internal/pipeline/run_test.go¶
478 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPlan |
func | |
TestPlanSkipsReadyMadeImages |
func | |
TestPlanBuildsJobImages |
func | |
TestBuildPodsAvoidExcludedNodes |
func | |
TestTransientRetry |
func | |
TestRunnerFailureStopsTheRun |
func | |
TestValidateCycle |
func | |
TestBuildPodPicksBuilder |
func | |
TestPlanScript |
func | TestPlanScript runs the real plan script with a stub railpack CLI. |
TestBuildkitPool |
func | |
TestPlanBuilds |
func | |
TestTestPod |
func | |
TestTestCaches |
func | |
TestCacheLetGoWhenItsNodeIsFull |
func | |
TestCacheInUseByAnotherRun |
func | A cache another run's test has mounted is in use: that test keeps it, and a waiting one goes without it rather than deleting it. |
internal/pipeline/task_test.go¶
161 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPlanTasks |
func | |
TestTaskPod |
func | |
TestTaskPodWithDatabaseAndCache |
func | A task with postgres and cache gets them like a test: a browser test drives the app with its database. |
TestTaskSecrets |
func | |
TestMaskSecrets |
func |
internal/platform¶
Package platform is the orchestration core: it turns GitHub events into CI runs, successful default-branch runs into releases, and releases into App objects that the controller deploys.
internal/platform/aprobaciones.go¶
96 lines
| Name | Kind | Summary |
|---|---|---|
(*Platform) PedirReversion |
method | PedirReversion records an agent's request to roll app back to release version, for a person to decide, and emails the administrators. |
(*Platform) DecidirAprobacion |
method | DecidirAprobacion is a person's decision on a waiting request of the organization. |
internal/platform/arreglos.go¶
91 lines
| Name | Kind | Summary |
|---|---|---|
(*Platform) isRenovateBranch |
method | isRenovateBranch reports whether a branch is Renovate's: named renovate/…, and, when it has an open pull request, one a bot opened from this repository (a person's branch of that name, or a fork's, is not). |
(*Platform) fixRenovate |
method | fixRenovate answers a failed run of a Renovate branch: when a step failed on a stale lockfile and a recipe of the app's (from the default branch) covers its folder, rendimiento runs it by itself and commits what it wrote to the branch, whose new run decides. |
internal/platform/caminos.go¶
158 lines
| Name | Kind | Summary |
|---|---|---|
caminosCache |
struct | caminosCache keeps each app's last history, and what GitHub said about commits, which never changes: a merge commit's first parent, and the merge base of two commits. |
caminosEntry |
struct | |
(*Platform) Caminos |
method | Caminos is an app's history of the last CaminosDays: its runs on the default branch and on every other branch, and where each branch left and rejoined it. |
ghSource |
struct | ghSource answers caminos.Build from GitHub, remembering what cannot change. |
(*ghSource) PullRequests |
method | |
(*ghSource) FirstParent |
method | |
(*ghSource) MergeBase |
method | |
isSHA |
func | isSHA reports whether s is a full commit SHA (40 hex digits). |
internal/platform/capacidad.go¶
191 lines
| Name | Kind | Summary |
|---|---|---|
CapacityHolder |
struct | CapacityHolder keeps the capacity set on the Environment page, read again every 15 seconds, so every process (the workers, the control service) follows a change within that time without a restart. |
(*CapacityHolder) Run |
method | Run reads the capacity now and every 15 seconds until ctx ends, and measures the nodes each time. |
(*CapacityHolder) Set |
method | Set is a capacity just saved, followed at once in this process. |
(*CapacityHolder) Get |
method | Get is the capacity now (zero values before it was read). |
(*CapacityHolder) Busy |
method | Busy are the nodes that were too full at the last measure. |
(*CapacityHolder) Runs |
method | Runs is how many runs go at once and per app (zero: the environment's). |
(*CapacityHolder) Caches |
method | Caches is how many caches each test keeps (zero: the default). |
(*CapacityHolder) Limits |
method | Limits are the nodes turned off on the Environment page, which take nothing, and the most CPU a step asks for. |
NodeLoad |
struct | NodeLoad is how full a node is: its CPU reserved by its pods' requests, and in use (-1 when the metrics server does not say), in percent. |
BusyNodes |
func | BusyNodes are the loads at pct or more, reserved or used. |
(*CapacityHolder) measure |
method | measure finds the busy nodes among those that take runs: not tainted against pods (the control plane), not cordoned, not turned off. |
(*CapacityHolder) nodeUse |
method | nodeUse is each node's CPU in use (thousandths of a core), from the metrics server; empty without it. |
internal/platform/choques.go¶
117 lines
| Name | Kind | Summary |
|---|---|---|
(*Platform) resolveAddOnly |
method | resolveAddOnly merges the default branch into a pull request's branch when every place where both changed a file is one where both only added lines (see mergeAddOnly): it commits the merge on the branch, as a person with git would, and returns the commit and the files it joined. |
(*Platform) queueResolved |
method | queueResolved tests the merge commit rendimiento made on a branch, and carries over the yes given to the commit before it: the new one holds nothing but that commit and what is already on the default branch. |
internal/platform/cobertura.go¶
114 lines
| Name | Kind | Summary |
|---|---|---|
(*Platform) branchFiles |
method | branchFiles are the files a branch's commit changes against the default branch; complete is false when GitHub listed only part of them (300 files). |
(*Platform) untested |
method | untested lists what of the branch's change (files, as branchFiles says), no step of its run builds or tests. |
untestedPaths |
func | untestedPaths names the untested paths for a sentence: mobile/, scripts/ and 3 more. |
untestedTitle |
func | untestedTitle is the GitHub check's title for a run that passed with untested paths. |
approvedUntestedTitle |
func | approvedUntestedTitle is the check's title once a person approved it. |
untestedSummary |
func | untestedSummary is the check's text: why it is not green, and how a person merges it. |
(*Platform) approveUntested |
method | approveUntested turns the check of a run with untested paths green once a person said yes to merging it: the yes stands for the test no step did. |
internal/platform/copias.go¶
237 lines
| Name | Kind | Summary |
|---|---|---|
copia |
struct | copia is a pull request's copy wherever it runs, or a short copy of a branch made only to run its checks en seco (Run). |
(copia) name |
method | name is the copy's App object (or containers' name). |
Copias |
interface | Copias keeps the copies of pull requests: App objects in the cluster (kubeCopias), or containers on this computer (LocalCopias). |
(*Platform) copias |
method | copias is where this platform keeps copies (nil: nowhere). |
kubeCopias |
struct | kubeCopias keeps each copy as an App object of its own, |
(kubeCopias) List |
method | |
copiaOf |
func | |
(kubeCopias) Get |
method | |
(kubeCopias) Put |
method | |
(kubeCopias) PutShort |
method | PutShort writes the short copy as an App object of its own, |
(kubeCopias) put |
method | |
(kubeCopias) Delete |
method | |
(kubeCopias) URL |
method | |
(kubeCopias) TestURL |
method | |
LocalCopias |
struct | LocalCopias keeps copies on this computer, as the local destination's containers (destino.Local.Copiar), at |
(LocalCopias) List |
method | |
(LocalCopias) Get |
method | |
(LocalCopias) Put |
method | |
(LocalCopias) PutShort |
method | |
(LocalCopias) Delete |
method | |
(LocalCopias) URL |
method | |
(LocalCopias) TestURL |
method | TestURL is the copy's first service with a port by its name, on the copy's own network, where its tests run: the copy has no domain here. |
internal/platform/cuota.go¶
96 lines
| Name | Kind | Summary |
|---|---|---|
OrgQuota |
struct | OrgQuota is the most CPU and memory the apps of one organization other than the platform's may ask for together (their requests, as the scheduler counts them); a zero value has no limit. |
specRequests |
func | specRequests is what a release asks the cluster for while it runs: the requests of each of its services and of the database and cache its needs run, times their replicas. |
(OrgQuota) overQuota |
method | overQuota says why requests of cpu and mem exceed the quota ("" when they do not). |
(*Platform) checkOrgQuota |
method | checkOrgQuota refuses a release of an app of an organization other than the platform's when, with the latest release of each of the organization's other apps, it would ask for more than the quota now (LiveQuota, or Config.OrgQuota). |
internal/platform/dormir.go¶
562 lines
| Name | Kind | Summary |
|---|---|---|
Cama |
interface | Cama is what sleeps on a computer: its apps' containers (destino.Local). |
Sueno |
struct | Sueno keeps rendimiento's sleep on a computer: what it stops, waits for and keeps, and what it does on waking. |
Publicacion |
struct | Publicacion is a publish going on: a deploying run, or a release that starts or is watched. |
EstadoSueno |
struct | EstadoSueno is the sleep as the page and the tray show it. |
(*Sueno) now |
method | |
(*Sueno) zona |
method | |
(*Sueno) cada |
method | |
(*Sueno) Estado |
method | Estado is where the sleep stands now. |
(*Sueno) Dormir |
method | Dormir puts rendimiento to sleep, for por. |
(*Sueno) terminarDeDormir |
method | terminarDeDormir waits for the runs going to end (the cut ones go back to the queue; a publish ends), then stops the apps' containers. |
(*Sueno) anotarCortadas |
method | anotarCortadas adds runs cut while it fell asleep to those repeated on waking. |
(*Sueno) dormirCama |
method | dormirCama stops the apps' containers, adds them to those to start on waking and notes the time asleep (z.mu held). |
(*Sueno) Despertar |
method | Despertar wakes rendimiento, for por: the same containers start again (the same apps, at the same releases), the kept webhooks are handled in order, and the runs sleep cut are claimed again. |
(*Sueno) Arrancar |
method | Arrancar is the sleep when rendimiento starts, before the queue is claimed: awake stays awake; after «Apagar del todo» it wakes; asleep it stays asleep, and what the engine started with the computer (the apps' containers restart with it) is stopped again. |
(*Sueno) Opciones |
method | Opciones keeps the sleep's options: the hour to wake at by itself ("08:00"; "" off) and «Dormir al cerrar la tapa» (for the desktop app). |
(*Sueno) Run |
method | Run wakes rendimiento at its hour, when one is set, until ctx ends. |
(*Sueno) MirarReloj |
method | MirarReloj wakes rendimiento when its hour came; it reports whether it did. |
ProximoDespertar |
func | ProximoDespertar is the first time at hhmm ("08:00") after desde, in loc. |
(*Platform) Dormido |
method | Dormido reports whether rendimiento sleeps (or falls asleep): no run is claimed, the forjas are not asked for commits, and webhooks are kept. |
(*Platform) cortada |
method | |
(*Platform) cortarCorriendo |
method | cortarCorriendo cuts the runs going here that cual picks: each goes back to the queue when it stops (execute). |
(*Platform) desplegando |
method | desplegando is the destination's release starting now, when it can say. |
(*Platform) publicaciones |
method | publicaciones are the publishes going on: deploying runs, and releases still watched by their verification. |
(*Platform) ocupada |
method | ocupada reports whether runs or a publish still go: sleep waits for them. |
(*Platform) repetirAlDespertar |
method | repetirAlDespertar puts a run sleep cut back in the queue and says so on its check: it is waiting, not failed. |
internal/platform/en_organizacion.go¶
73 lines
| Name | Kind | Summary |
|---|---|---|
(*Platform) allowedInOrg |
method | allowedInOrg checks what an app may be in its organization, beyond what rendimiento.yaml itself allows (spec.Validate): it is checked when the app is created and on every push that brings its rendimiento.yaml. |
internal/platform/enseco.go¶
482 lines
| Name | Kind | Summary |
|---|---|---|
(*Platform) dryPlan |
method | dryPlan is what a branch runs en seco, and the release published (nil when none is): against it when there is one, else against the app's default branch. |
(*Platform) testsOnCopy |
method | testsOnCopy says whether the branch's tests run en seco against its pull request's copy: the copy's own tests (testPreview) then wait for them. |
(*Platform) dryRun |
method | dryRun runs the branch's checks en seco when it touches them or the app, and records it on the run (run.Dry). |
(*Platform) dryOnPublished |
method | dryOnPublished runs the plan's checks against the published release: their results, and whether one did not pass. |
judged |
func | judged reads the tests' report in a dry run's results, and says whether one of the checks (want of them) did not pass, or did not run. |
(*Platform) dryOnCopy |
method | dryOnCopy runs the plan's copy checks against a copy of the branch: its pull request's, once it runs this commit, or a short one made for them. |
judgeDryTests |
func | judgeDryTests reads the app's tests' report en seco: a test that failed fails the check (en seco nothing is advisory: the tests are new), and the message counts them. |
dryFailedNames |
func | dryFailedNames are the checks that did not pass en seco, against either. |
dryCopyOf |
func | dryCopyOf is what the run checked against a copy of the branch (nil: nothing). |
dryWhere |
func | dryWhere says, in the forge's words, where what failed en seco ran: against the published release, the pull request's copy, or a short copy of the branch. |
dryFailedTitle |
func | dryFailedTitle is the GitHub check's title for a run that passed with a check that failed en seco. |
approvedDryTitle |
func | approvedDryTitle is the check's title once a person approved it anyway. |
dryFailedSummary |
func | dryFailedSummary is the check's text: what failed, and how to merge it. |
(*Platform) noteMergedDespiteDry |
method | noteMergedDespiteDry writes in the Ruta that a person merged a branch whose checks failed en seco: when that release rolls back, whoever looks finds why. |
internal/platform/entrega.go¶
70 lines
| Name | Kind | Summary |
|---|---|---|
(*Platform) PullsForDelivery |
method | PullsForDelivery opens the pull request of each branch an encargo delivers (a link github.com/ |
dedupe |
func |
internal/platform/forjas.go¶
176 lines
| Name | Kind | Summary |
|---|---|---|
notConnected |
struct | notConnected is a forja an app says it lives on that is not connected here (GitLab, before it is): every call says so. |
(notConnected) err |
method | |
(notConnected) FileAt |
method | |
(notConnected) RepoFS |
method | |
(notConnected) ChangedFiles |
method | |
(notConnected) BranchSHA |
method | |
(notConnected) Branches |
method | |
(notConnected) CommitSubject |
method | |
(notConnected) MergeBase |
method | |
(notConnected) FirstParent |
method | |
(notConnected) CloneToken |
method | |
(notConnected) CreateCheck |
method | |
(notConnected) UpdateCheck |
method | |
(notConnected) OpenPR |
method | |
(notConnected) CreatePull |
method | |
(notConnected) RecentPullRequests |
method | |
(notConnected) OpenPulls |
method | |
(notConnected) Pull |
method | |
(notConnected) MergePull |
method | |
(notConnected) ClosePull |
method | |
(notConnected) Comment |
method | |
(notConnected) DeleteBranch |
method | |
(notConnected) CommitMerge |
method | |
(notConnected) Files |
method | |
(notConnected) CreateBranch |
method | |
(notConnected) CommitFiles |
method | |
Repos |
struct | Repos is every forja connected here, as one: each call goes to the forja its repository lives on (forja.Of), so what works on an app's repository (the declared fixes, the coding agent, the diagnostician) works on GitHub, GitLab and Bitbucket alike. |
(*Platform) Repos |
method | Repos is the platform's forjas as one (see Repos). |
(Repos) of |
method | of is the forja of a repository. |
(Repos) FileAt |
method | |
(Repos) RepoFS |
method | |
(Repos) ChangedFiles |
method | |
(Repos) BranchSHA |
method | |
(Repos) Branches |
method | |
(Repos) CommitSubject |
method | |
(Repos) Files |
method | |
(Repos) MergeBase |
method | |
(Repos) FirstParent |
method | |
(Repos) CloneToken |
method | CloneToken has no repository to go by: it is GitHub's (a run clones with Platform.CloneToken, which knows its app's forja). |
(Repos) CreateCheck |
method | |
(Repos) UpdateCheck |
method | |
(Repos) CreateBranch |
method | |
(Repos) CommitFiles |
method | |
(Repos) OpenPR |
method | |
(Repos) CreatePull |
method | |
(Repos) RecentPullRequests |
method | |
(Repos) OpenPulls |
method | |
(Repos) Pull |
method | |
(Repos) MergePull |
method | |
(Repos) ClosePull |
method | |
(Repos) Comment |
method | |
(Repos) DeleteBranch |
method | |
(Repos) CommitMerge |
method |
internal/platform/fusion.go¶
303 lines
| Name | Kind | Summary |
|---|---|---|
(*Platform) mergeLoop |
method | mergeLoop looks at the open pull requests of the apps that merge by themselves, every minute until ctx ends. |
(*Platform) MergeReady |
method | MergeReady merges each open pull request of the app whose head passed its run, and records on that run what became of it: merged, in conflict with the default branch, or refused by GitHub (a review or a check it asks for). |
depsPull |
func | depsPull says whether a pull request is a dependency update (Renovate's, Dependabot's). |
(*Platform) othersPassed |
method | othersPassed says whether the commit passed in every other app of the same repository that ran it: one pull request, all of its apps. |
(*Platform) mergePull |
method | mergePull asks GitHub whether the pull request can be merged, merges it when it can, and writes the outcome on the run. |
NotApprovable |
struct | NotApprovable is ApproveMerge's answer for a run whose commit rendimiento cannot merge: it says why, for the person. |
(*NotApprovable) Error |
method | |
(*Platform) ApproveMerge |
method | ApproveMerge is a person's yes to merging a run's commit: it is written on the run, the branch gets a pull request when it has none, and it is merged now when the run already passed, or when it does. |
(*Platform) pullText |
method | pullText is the title and body of the pull request rendimiento opens for a run's branch: the commit's subject (or the branch's name), and what the change says of itself in cambios/ |
(*Platform) ApproveLinks |
method | ApproveLinks approves what an accepted encargo delivered: each link to a branch of an app that merges by itself (github.com/ |
branchLink |
func | branchLink reads the repository and branch out of a link to a branch on any forja (see forja.BranchOfLink). |
inForjaWords |
func | inForjaWords says a message about a change in the words of the app's forja: on GitLab, merge request !7 where GitHub says pull request #7 (and a preview of !7); on Bitbucket, the same pull request #7 but Bitbucket's name (the Spanish catalog has them all). |
internal/platform/libreta.go¶
267 lines
| Name | Kind | Summary |
|---|---|---|
(*Platform) Libreta |
method | Libreta is the app's notebook (Ruta 150): what was asked for it in the Ruta and in encargos, and Renovate's pull requests, each with its state computed from its branches' runs, pull requests and releases. |
(*Platform) keepLibreta |
method | keepLibreta writes down what the libreta worked out of a Ruta entry's branch and was not kept yet (merged by hand, say, while rendimiento was not looking): its merge, and the release that carried it. |
(*Platform) noteMerged |
method | noteMerged writes down, on the Ruta entries worked on a branch, that it was merged: its head commit then, and when. |
(*Platform) PullMerged |
method | PullMerged is GitHub saying a pull request was merged (by a person, or by rendimiento): every app of the repository notes it on the entries worked on its branch. |
(*Platform) noteReleased |
method | noteReleased writes down, on the app's merged branches no release had carried yet, the release that passed its verification (or needed none): its run came after their merge, so it holds them. |
(*Platform) linkRutaTrailers |
method | linkRutaTrailers links a pushed branch to the Ruta entries its commits name in a «Ruta: N» trailer (see RutaRefs). |
RutaRefs |
func | RutaRefs are the Ruta entries a commit message names in its «Ruta: N» lines, each once, in order. |
internal/platform/mesa.go¶
288 lines
| Name | Kind | Summary |
|---|---|---|
(*Platform) Mesa |
method | Mesa is the app's work board: each branch with its pull request, its last run and the encargos about it, and who it waits for. |
(*Platform) heads |
method | heads asks GitHub which branches exist and, for each with a run on the board, whether its commit is already in the default branch. |
inMainEntry |
struct | |
inMainCache |
struct | inMainCache keeps whether each commit is in its app's default branch. |
(*Platform) CloseSpare |
method | CloseSpare closes a line the work board calls spare: its open pull request, closed without merging, and its branch, deleted. |
mesaCountEntry |
struct | |
mesaCountCache |
struct | mesaCountCache keeps each app's count and the counts being made. |
(*Platform) MesaWaiting |
method | MesaWaiting is, for the home page, how many lines of each app's board wait for a person, by app ID (an app whose count is not known yet is left out). |
(*Platform) makeMesaCount |
method | makeMesaCount makes one app's count and keeps it; on a failure the old count (if any) stays, and the next look tries again. |
internal/platform/platform.go¶
1409 lines
| Name | Kind | Summary |
|---|---|---|
Config |
struct | Config is the platform's cluster-level settings. |
Platform |
struct | Platform connects GitHub, the store, CI and the cluster: webhooks become runs, runs become releases, releases become App objects. |
Proposal |
struct | Proposal is what the wizard shows before anything is written anywhere. |
Migration |
struct | Migration describes what is running in a namespace rendimiento would adopt. |
(*Platform) namespaceServing |
method | namespaceServing returns the namespace of an ingress not managed by rendimiento that serves one of the spec's hosts, or "". |
argoApp |
func | argoApp returns the ArgoCD Application tracking an object: the tracking-id annotation (Argo CD 2.x annotation mode and 3.x default) or the legacy instance label. |
(*Platform) InspectNamespace |
method | InspectNamespace reports what already runs in ns (nil if it does not exist), so the wizard can offer a migration for any app name. |
(*Platform) inspectNamespace |
method | inspectNamespace reports what already runs in ns, or nil if it does not exist. |
(*Platform) Propose |
method | Propose inspects a repo and proposes how to deploy it: its rendimiento.yaml if it has one, otherwise a generated one, plus what is already running in the namespace it would use. |
OnboardRequest |
struct | OnboardRequest is what the New app wizard submits. |
OnboardResult |
struct | OnboardResult is the created app and either the onboarding PR or the first run. |
(*Platform) Onboard |
method | Onboard registers the app, creates its App object (waiting for a build) and either opens the onboarding PR or, if the repo already carries a rendimiento.yaml, queues the first build right away. |
(*Platform) Register |
method | Register records the app and creates its App object, which waits for a first build; the next push with a rendimiento.yaml builds it. |
(*Platform) nameInOrg |
method | nameInOrg is the name an app gets in its organization. |
(*Platform) DeleteApp |
method | DeleteApp removes the app from its destination (in Kubernetes, the namespace and DNS go with the App object) and the app's records. |
Impact |
type | Impact describes what deleting an app would destroy. |
(*Platform) DeleteImpact |
method | DeleteImpact lists what deleting an app would remove (namespace, volumes, secrets), shown before deleting. |
(*Platform) DisconnectApp |
method | DisconnectApp stops managing an app but leaves everything running where it is (in Kubernetes, its objects lose rendimiento's ownership and labels, and DNS records stay), and removes the app and its history. |
PushEvent |
type | PushEvent is a push to a branch, as the forja told it. |
SaysSkipCI |
func | SaysSkipCI reports whether a commit message asks for no run, the way GitHub Actions reads it: [skip ci], [ci skip] or [no ci], in any case. |
(*Platform) HandlePush |
method | HandlePush queues a run for every app deployed from the repo. |
(*Platform) QueueRun |
method | QueueRun reads rendimiento.yaml at the commit, plans the steps and queues the run. |
(*Platform) rejectRun |
method | rejectRun records a push whose rendimiento.yaml is invalid as a failed run, so it shows where pushes are looked for: on the app page, as a red check on the commit in GitHub and, for the default branch, in an email. |
(*Platform) Work |
method | Work claims queued runs until ctx ends. |
appGoing |
struct | appGoing is what one app has going: its runs, whether one deploys, and their branches. |
limits |
struct | |
(*Platform) limits |
method | limits are how many runs go at once, and per app, right now. |
(*Platform) busy |
method | busy is what the runs going rule out for the next one (claimMu held). |
(*Platform) work |
method | work takes the oldest queued run that the runs going allow (an app's deploys, and each branch's runs, keep their order) until ctx ends. |
(*Platform) CancelRun |
method | CancelRun stops a run wherever it is: here, in the process running it (through the hub), or in the queue before it starts. |
(*Platform) RequestCancel |
method | RequestCancel asks whichever process runs a run to stop it. |
runIDOf |
func | runIDOf reads a run id from an event's data: an int64 in this process, JSON when it came from another. |
(*Platform) Cancel |
method | Cancel stops a run in progress in this process; it reports whether one was found. |
(*Platform) execute |
method | execute does one run from start to end: it reads the app's spec (a branch's own, from its commit), plans the steps, leaves out what has not changed since the last release (its images are reused) and the tasks that do not apply, runs the rest, and records the result. |
(*Platform) release |
method | release records a release from a successful run: the images it built (by digest), the ones it reused, and ready-made images as given. |
runImages |
func | runImages are the images a run passed: the ones it built (by digest), the ones it reused, and ready-made images as given. |
errPreDeploy |
struct | errPreDeploy means a release was recorded but not deployed: a required pre-deploy task failed. |
(errPreDeploy) Error |
method | Error is why the release was not deployed. |
(*Platform) preDeploy |
method | preDeploy runs the release's pre-deploy tasks before it is rolled out. |
(*Platform) changes |
method | changes lists the files changed since the latest release, for a push to the default branch. |
touched |
func | touched reports whether any of files is under dir or a watched path. |
reusable |
func | reusable decides which built services, jobs and builds can keep the image from the latest release because nothing they are built from changed since. |
skippedTasks |
func | skippedTasks returns the task steps that do not run this time, with why: deploy-only tasks on branch and pull request runs (they may read secrets), and tasks whose path and watch paths are unchanged since the latest release. |
(*Platform) Rollback |
method | Rollback creates a new release that restores an earlier one's images and spec (the Rollback button). |
(*Platform) rollbackTo |
method | rollbackTo releases an earlier release's images and spec again, as a new release whose verification is recorded as skipped with note. |
(*Platform) pointApp |
method | pointApp makes the release the one its destination runs; a release with nothing to run (only builds) is only recorded. |
(*Platform) Target |
method | Target is where the platform's apps run: Destino, or the cluster. |
(*Platform) orgSlug |
method | orgSlug is the address of the organization an app belongs to, which its App object carries to the cluster. |
(*Platform) startCheck |
method | startCheck shows the run on its commit in GitHub, as an "in progress" check that links to the run page (0: no check, e.g. |
(*Platform) finishCheck |
method | finishCheck completes the run's GitHub check: success, failure or cancelled, with the run's message; action_required for a run that passed with paths no step tests (run.Untested), or with a check that failed en seco (run.Dry), that nobody approved. |
appTopic |
func | appTopic is the events topic for an app's live updates. |
RunTopic |
func | RunTopic is the events topic for a run's live updates. |
AppTopic |
func | AppTopic is the events topic for an app's live updates. |
(*Platform) publishRun |
method | publishRun sends the run as it is now to whoever watches it or its app. |
installationKey |
struct | |
installation |
struct | installation is the app's connection to its forja. |
withInstallation |
func | withInstallation carries the app's installation (GitHub's, or its GitLab connection) into the steps, so each can get a token to clone the repository (see CloneToken). |
(*Platform) CloneToken |
method | CloneToken is plugged into the executor: it mints a token for the installation carried in the run's context. |
(*Platform) repos |
method | repos is the forja the app's code lives on. |
(*Platform) cloneURL |
method | cloneURL is where build pods clone the app's repository from: GitHub takes owner/name, another forja says its address. |
(*Platform) CloneURL |
method | CloneURL is the app's repository's address for build pods (see cloneURL). |
internal/platform/posttask.go¶
170 lines
| Name | Kind | Summary |
|---|---|---|
stageTasks |
func | stageTasks are the release's tasks of one stage (pre- or post-deploy); the app's own tests (tests:) are a post-deploy task too. |
buildImage |
func | buildImage resolves a task's image "build: |
postDeployTasks |
func | postDeployTasks are the release's post-deploy tasks. |
(*Platform) runPostDeploy |
method | runPostDeploy runs a release's post-deploy tasks (see runStage). |
(*Platform) runStage |
method | runStage runs a release's tasks of one stage, each once its after: tasks succeeded (a task whose dependency failed is skipped), and records each one's state as it goes. |
(*Platform) runTasks |
method | runTasks runs tasks against a release, each once its after: tasks succeeded, and hands each state to save as it goes (stage is what the results say they were). |
(*Platform) saveTask |
method | saveTask records a deploy task's state; a failure to record is only logged. |
judgeTasks |
func | judgeTasks folds post-deploy results into a verification: a failed required task fails the release; a failed optional one is a warning. |
internal/platform/previas.go¶
487 lines
| Name | Kind | Summary |
|---|---|---|
PreviewName |
func | PreviewName is the App object of pull request number's copy. |
ShortCopyName |
func | ShortCopyName is the App object of the short copy run makes for its checks en seco, when its branch has no pull request. |
previewURL |
func | previewURL is the copy's address: its first service with a domain. |
(*Platform) openPullOf |
method | openPullOf is the open pull request of a branch, from the app's own repository (0 when none, or a fork's). |
(*Platform) deployPreview |
method | deployPreview gives a branch's open pull request its copy once the branch's run passed: the App object is written (made the first time) with the run's images, the oldest copy goes first when the app has its most, and a "preview" check on the commit links to the copy's address. |
(*Platform) deployPreviewOf |
method | deployPreviewOf writes pull request number's copy from a run that passed. |
(*Platform) testPreview |
method | testPreview runs the app's own tests (tests:) against pull request number's copy once it is healthy, and adds each test's result to the pull request's comment (slice 4). |
(*Platform) sayOnPull |
method | sayOnPull adds a section (the tests' results) to the pull request's comment about its copy. |
previewTests |
func | previewTests is the comment's section of the copy's tests: how many passed, then each that did not. |
previewComment |
func | previewComment is the pull request's comment about its copy. |
(*Platform) deletePreview |
method | deletePreview deletes a copy and says why in its pull request's comment. |
(*Platform) makeRoom |
method | makeRoom deletes the copies of the app idle longest until a new one fits under max (keep is the pull request whose copy is being written, which never goes). |
(*Platform) OpenedPreview |
method | OpenedPreview gives a pull request opened (or reopened) on a branch whose last run already passed its copy now, from that run's images: otherwise it would wait for the next push. |
(*Platform) previewFromLastRun |
method | previewFromLastRun gives pull request number its copy from its branch's last run, when that run passed (and is not a deploy of the main branch). |
(*Platform) catchUpPreviews |
method | catchUpPreviews makes the copies a lost "opened" event left out: an open pull request of an app that asks for previews, with no copy, whose branch already passed. |
(*Platform) imagesOfRun |
method | imagesOfRun are the images a finished run passed, from its recorded steps: what it built (by digest), what it reused from the app's latest release, and ready-made images as given. |
(*Platform) ClosePreview |
method | ClosePreview deletes the copy of a closed or merged pull request, when GitHub says so; the sweep catches what a lost webhook leaves. |
(*Platform) PreviewLoop |
method | PreviewLoop deletes, every PreviewEvery (previewSweep), the copies whose app no longer asks for previews or is gone, whose pull request is closed, or that went longer than the app's keep without a push, and makes those that are missing. |
(*Platform) sweepPreviews |
method | |
(*Platform) previewGone |
method | previewGone says why a copy should go ("" to keep it). |
internal/platform/pruebas.go¶
44 lines
| Name | Kind | Summary |
|---|---|---|
(*Platform) judgeTests |
method | judgeTests reads the app's own tests from the release's tests task, moves each test's state, keeps the results with the release, and returns the failures that roll it back (blocking tests that failed) and what a person should know. |
internal/platform/ramas.go¶
179 lines
| Name | Kind | Summary |
|---|---|---|
kindOf |
func | kindOf is a branch's kind, from its pull request's labels and its name. |
BranchKind |
struct | BranchKind is what the Runs tab knows of a branch: its kind, and its pull request when it has one. |
BranchKinds |
struct | BranchKinds is the answer for the Runs tab. |
branchPull |
struct | |
branchPullsEntry |
struct | |
branchPullsCache |
struct | branchPullsCache keeps each app's last answer from GitHub. |
(*Platform) BranchKinds |
method | BranchKinds is the kind of each of the branches. |
(*Platform) branchPulls |
method | branchPulls is the pull request of each branch of the app (the open one, or else the latest), from GitHub, kept for branchPullsTTL. |
(*Platform) recentPulls |
method | recentPulls is the app's most recently updated pull requests, asked of GitHub at most once per branchPullsTTL. |
internal/platform/recorder.go¶
124 lines
| Name | Kind | Summary |
|---|---|---|
(*Platform) StepUpdate |
method | StepUpdate implements pipeline.Recorder: persist, then notify the UI. |
stepEvent |
func | stepEvent is what the run's page is told of a step that changed: its status and, with the names the API's steps use, when it started and finished as stored, so a bar stops where the step did without a reload. |
timeOrNil |
func | |
(*Platform) StepLog |
method | StepLog implements pipeline.Recorder. |
logWriter |
struct | |
(*logWriter) Write |
method | Write buffers step output and flushes it to the store and live subscribers. |
(*logWriter) flush |
method | flush appends what was written since the last flush to the step's log in the database. |
(*logWriter) flushLoop |
method | flushLoop flushes every second until the step ends. |
(*logWriter) Close |
method | Close flushes what is left. |
internal/platform/reintentar.go¶
83 lines
| Name | Kind | Summary |
|---|---|---|
NotRetryable |
struct | NotRetryable says why a run cannot be retried. |
(*NotRetryable) Error |
method | |
(*Platform) RetryRun |
method | RetryRun runs again what did not pass in a failed run, in the same run: what passed keeps its result and its image. |
(*Platform) noteStumbles |
method | noteStumbles records the steps of a retried run that failed before and passed now (a stumble), and calls a step flaky when it stumbled FlakyAfter times in store.StumbleWindow. |
internal/platform/solo_abrir.go¶
74 lines
| Name | Kind | Summary |
|---|---|---|
PullOpened |
struct | PullOpened is what OpenPull did: the branch's pull request, and whether it was open already. |
(*Platform) OpenPull |
method | OpenPull opens the pull request of a run's branch into the default branch, without merging it. |
internal/platform/union.go¶
93 lines
| Name | Kind | Summary |
|---|---|---|
hunk |
struct | hunk is one change of a side against the base: base lines [from, to) become lines. |
hunks |
func | hunks are the changes that turn base into side, in base order. |
sameHunk |
func | |
mergeAddOnly |
func | mergeAddOnly joins two sides of a file changed from base, the way git's three-way merge does, and says whether it could without a person: where both sides changed the same place, it can only when both only added lines there (as two branches each adding a menu entry or a translation after the same line), and keeps both, theirs (the default branch's) first. |
before |
func | before says change a ends before change b starts, with at least one base line between them that neither touches. |
splitLines |
func | splitLines splits text into lines that keep their "\n". |
internal/platform/verify.go¶
575 lines
| Name | Kind | Summary |
|---|---|---|
VerifySettings |
struct | VerifySettings configure release verification: after a release is live, its services are checked for Window; a release that breaks a service that worked before it is rolled back to the last good release. |
RolloutState |
type | RolloutState is where a release's rollout stands. |
(*Platform) startVerification |
method | startVerification watches a new release in the background. |
(*Platform) stopVerification |
method | stopVerification ends an app's running verification as superseded (a newer release, or a rollback by hand, replaced the release). |
verifyRequest |
struct | verifyRequest names the app and, to start, the release to watch. |
(*Platform) ServeVerifications |
method | ServeVerifications watches the releases the other processes send (see VerifyElsewhere) until ctx ends. |
(*Platform) verify |
method | verify watches a release once it is deployed: it waits for every pod to run the new version, runs the post-deploy tasks, checks each service every few seconds for the window, and then decides. |
(*Platform) verificationFailed |
method | verificationFailed rolls back to the last good release, or only reports when rollback is off or there is nothing to return to. |
(*Platform) verifyMessage |
method | verifyMessage is the email for a release that failed verification: rolled back (to = {good release, new release number}) or kept (why). |
shortSHA |
func | shortSHA is a commit's first 7 characters. |
(*Platform) lastGoodRelease |
method | lastGoodRelease is the newest release before number that did not fail verification (releases from before verification existed count as good). |
(*Platform) waitRollout |
method | waitRollout waits until the release is fully rolled out and healthy, it fails, or RolloutTimeout passes. |
windowStats |
struct | windowStats accumulates one check's results during a verification window. |
(*windowStats) add |
method | add counts one check result (and its time, when it answered). |
(*windowStats) p95 |
method | p95 is the time 95% of answers took at most, in milliseconds. |
judge |
func | judge decides a verification. |
(*Platform) setVerification |
method | setVerification records the state and tells open App pages. |
(*Platform) ResumeVerifications |
method | ResumeVerifications restarts verifications interrupted by a restart: a release that is still the app's current one is watched again from the start; an older one is marked superseded. |
fmtDur |
func | fmtDur is a duration as people read it: "5 min", or "1m30s". |
fmtMS |
func | fmtMS is milliseconds as "350 ms" or "1.2 s". |
(*Platform) notifyRunFailed |
method | notifyRunFailed emails a failed run of the default branch: nothing was released. |
(*Platform) postDeployOnly |
method | postDeployOnly runs a release's post-deploy tasks without verification (it is off): once the rollout is healthy, results are recorded only. |
internal/platform/vigia.go¶
110 lines
| Name | Kind | Summary |
|---|---|---|
Vigia |
struct | Vigia asks the forjas for new commits where they cannot send their webhooks (rendimiento on a computer, without a tunnel): every Every it lists each app's branches on its forja (GitHub, GitLab or Bitbucket), and a branch whose head moved is handled as a push. |
(*Vigia) Run |
method | Run looks until ctx ends. |
(*Vigia) Mirar |
method | Mirar looks once at every app's branches. |
(*Vigia) nuevo |
method | nuevo notes a branch's head and reports whether it is a push to handle: a head that moved, or a branch that appeared. |
(*Vigia) ran |
method | ran reports whether the app has a run of this commit already. |
internal/platform/arreglos_test.go¶
100 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestRenovateFixOncePerCommit |
func | A Renovate branch's run that failed on a stale lockfile gets the recipe that covers its folder, by itself, committed to the branch; once a commit, never on a commit a fix made, never a fix of the app's own, and never on a person's branch. |
internal/platform/capacidad_test.go¶
57 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestLimitsFollowTheEnvironmentPage |
func | What the Environment page sets wins over the environment's values, up to MaxWorkers; a value it leaves at zero keeps the environment's. |
TestBusyNodes |
func | A node reserved or used at the limit or more is busy; when every node is, the least full one still takes work; at 100 nothing is ever busy. |
internal/platform/choques_test.go¶
54 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestResolveAddOnly |
func |
internal/platform/cuota_test.go¶
60 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestOrgQuotaRequests |
func | A release counts its services' requests times their replicas, and the database its needs run; the quota refuses what goes past it. |
internal/platform/dormir_test.go¶
390 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestDormirWaitsForThePublish |
func | Dormir waits for the publish going on: the branch run stops at once and goes back to the queue (not failed), the deploying run ends, and only then do the apps' containers stop. |
TestDormirYaAndApagar |
func | «Ya» cuts the publish too: the deploying run goes back to the queue (the app stays on what it runs) and publishes on waking. |
TestDormirSurvivesARestart |
func | Asleep without «Apagar del todo», a restart stays asleep, and stops again what the engine started with the computer. |
TestDormirHandlesTheKeptWebhooks |
func | The webhooks kept while asleep are handled on waking, in order: the summary counts them. |
TestDormirWakesAtItsHour |
func | At its hour it wakes by itself; before it, not; and the hour is the next one after it fell asleep. |
TestDormirRefusedInACluster |
func | In a cluster rendimiento does not sleep. |
internal/platform/en_organizacion_test.go¶
78 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestWhatAnOrganizationsAppMayBe |
func | An app of an organization other than the platform's has a namespace of its own (no sharedNamespace) and never takes the platform's address; no organization takes an address another organization's app claims, even before it is served. |
internal/platform/enseco_test.go¶
200 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestEnSeco |
func | A branch that changes only its checks runs them en seco against the published release: a pass is merged as usual; a failure only warns (the run passed, its check asks a person, rendimiento does not merge it by itself), and a person's yes merges it and notes it in the Ruta. |
internal/platform/entrega_test.go¶
48 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPullsForDelivery |
func | A delivered encargo's branch gets its pull request: its link goes before the branch's, which stays; another organization's repository, the main branch and other links are left alone. |
internal/platform/libreta_test.go¶
26 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestRutaRefs |
func | A commit names Ruta entries in «Ruta: N» lines: with or without #, several comma-separated, in any case; anything else on the line, or a line that only mentions the Ruta, names none. |
internal/platform/mesa_cuenta_test.go¶
106 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestMesaWaiting |
func | The home page's counts: made once and kept, all apps at once; an old count is still the answer while a new one is made behind it, so a look never waits for GitHub again; one that is slow the first time is left out (it comes on the next look), and a failure keeps the old count. |
internal/platform/mesa_test.go¶
58 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCloseSpare |
func | A copy on the work board is closed by a person's button: its pull request without merging, and its branch. |
internal/platform/nombres_test.go¶
85 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestAppNamesByOrganization |
func | Two organizations can both have an app called "tienda": the platform's keeps the name as given, any other carries its address in front (which is also its namespace). |
internal/platform/palabras_test.go¶
47 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestInForjaWordsOutsideMerging |
func | Messages about a change outside merging (previews, the board) say it in the forja's words, and the Spanish catalog knows each. |
internal/platform/platform_test.go¶
1303 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestMain |
func | |
TestOnboardPushDeployRollback |
func | |
TestProposeRepoWithoutCode |
func | A repo with no code, only rendimiento.yaml with a ready-made image (p0dxD/ai, Ollama): the wizard got "detected": null and crashed on it. |
TestProposeDetectsExistingDeployment |
func | |
TestChangeDetection |
func | Only what changed since the last release is tested, built and rolled. |
TestEjemplosEnElEsquema |
func | Every example is accepted by the App object's real schema (envtest with the CRDs): created, and given a release when something of it runs; one with nothing to run gets no App object. |
TestLibrary |
func | A library has only tasks: it is onboarded without an App object in the cluster (whose schema needs a service), its runs test it, and a run on its default branch succeeds without a release. |
TestTasks |
func | |
TestDisconnectAndSuggestedName |
func | Disconnect leaves everything running and unowned; the wizard suggests the namespace that already serves a repo's hosts. |
TestInvalidSpecIsAFailedRun |
func | A push whose rendimiento.yaml is invalid is a failed run with the reason, a failed check on the commit and an email; the app's spec is unchanged and nothing is built. |
TestCaminos |
func | The Caminos tab: an app's runs by branch, rebuilt only when a newer run appears (or after caminosTTL). |
TestFusionAutomatica |
func | An app that merges by itself: the open pull request of a branch that passed is merged and its branch deleted; one in conflict is not, and its run says so; with the option off, nothing is merged. |
TestFusionSinPruebas |
func | A branch whose change touches what no step builds or tests (a mobile app beside the tested folders) passes, but is not merged by itself: its check asks for a person (action_required, so Renovate's automerge waits too), and a person's yes turns it green and merges it. |
internal/platform/posttask_test.go¶
198 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPostDeployVerification |
func | A required post-deploy task that fails fails verification and rolls the release back; an optional one is only reported; one waiting on a failed task is skipped. |
TestPreDeploy |
func | Pre-deploy tasks are skipped on an app's first release, run before the rollout afterwards, and a failed one stops the release from deploying. |
internal/platform/previas_test.go¶
318 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPreviewCopies |
func | A branch's run that passed gives its open pull request a copy, at pr- |
TestPreviewWhenOpened |
func | A pull request opened after its branch already passed gets its copy at once, from that run's images; a fork's never does. |
TestPreviewRunsTheAppsTests |
func | Once a copy is healthy, the app's own tests run against its address and the pull request's comment says how they went. |
(*fakeCopias) TestURL |
method | |
TestPreviewCatchUp |
func | Where GitHub sends no events (a computer), the sweep makes the copy of a pull request opened on a branch that already passed, at the copy's own address, and removes it once the pull request closes. |
internal/platform/ramas_test.go¶
31 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestKindOf |
func |
internal/platform/recorder_test.go¶
49 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestStepEventCarriesTheStoredTimes |
func | The run's page learns from the step event when a step started and finished, under the names the API's steps use, so a finished step's bar stops without a reload; a time not known yet is left out. |
internal/platform/reuse_test.go¶
19 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestReusableBuilds |
func |
internal/platform/seco_copia_test.go¶
311 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestEnSecoConCopia |
func | What a branch's checks run against en seco (step 2): the published release when only the checks changed; the pull request's copy when the app changed, once that copy runs the commit; a short copy, deleted when they end, when the branch has no pull request; nothing, saying why, when the app has no previews, the copies are at previews.max (a pull request's is never deleted for one) or the copy never runs the commit; nothing at all for a branch of documentation. |
internal/platform/skipci_test.go¶
17 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestSaysSkipCI |
func |
internal/platform/union_test.go¶
49 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestMergeAddOnly |
func |
internal/platform/verify_test.go¶
157 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestJudge |
func | |
TestReleaseVerification |
func | A release that breaks its service is rolled back to the last good one; a healthy release passes. |
internal/platform/vigia_test.go¶
29 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestVigiaNuevo |
func | Which heads the watcher handles as pushes: on the first look only an unbuilt default branch; then any branch that moved or appeared. |
internal/probados¶
Package probados changes, from the Environment page (Llaves y ajustes), the settings the platform reads when it starts and that change what it makes from then on: the image registry, the DNS zone and target, the certificate issuer, the storage class, the ingress class and its public address.
internal/probados/probados.go¶
1046 lines
| Name | Kind | Summary |
|---|---|---|
Ajuste |
struct | Ajuste is one thing the page changes: one setting, or two that go together (the DNS zone and its target). |
Buscar |
func | Buscar finds a setting by its id. |
Claves |
func | Claves are every variable that changes here. |
Almacen |
interface | Almacen keeps the saved values: platform settings, beside the live ones (store.Store). |
AlArrancar |
func | AlArrancar puts the saved values in the environment before the platform reads it, so they win over the ConfigMap's. |
DNS |
interface | DNS is the DNS provider the platform uses now (the Cloudflare token in use): what the new zone is tested with. |
Paso |
struct | Paso is one step of a test or a change. |
Resultado |
struct | Resultado is how a test (or a change) went: the steps tried, in order (they stop at the first that fails). |
Probador |
struct | Probador tests a new value of a setting and saves it. |
pasada |
struct | |
(*Probador) http |
method | |
(*Probador) esperar |
method | |
(*Probador) imagenPrueba |
method | |
(*Probador) actual |
method | |
(*Probador) valores |
method | Valores are a setting's new values, trimmed, with every key of it (the ones not given keep the value in use). |
(*Probador) Probar |
method | Probar tests new values of the setting id. |
(*Probador) Cambiar |
method | Cambiar saves the values a test passed with (its ficha) and restarts the platform so it takes them. |
(*Probador) Volver |
method | Volver forgets the saved values of a setting: the ConfigMap's hold again, after a restart. |
(*Probador) guardar |
method | guardar saves every value, or none: when one cannot be saved, the ones before it get their earlier value back. |
(*Probador) reiniciar |
method | |
mismos |
func | |
nonce |
func | |
(*Probador) validar |
method | validar checks the values are well formed and that something changes. |
hostValido |
func | |
dominio |
func | dominio: a name of labels, with a dot. |
(*Probador) registroHTTP |
method | |
(*Probador) registroBase |
method | registroBase is how the registry answers: over HTTPS, or (with REGISTRY_INSECURE) over plain HTTP when HTTPS does not answer. |
(*Probador) probarRegistro |
method | probarRegistro: the registry answers its API; BuildKit pushes a tiny image to it; every node that runs apps pulls it; the image is deleted. |
(*Probador) nodos |
method | nodos are the nodes apps can run on: ready, and not cordoned. |
(*Probador) bajanTodos |
method | bajanTodos runs a pod of the test image on every node: a node pulled it when its container has the image's id, whatever the container does then (the image has nothing to run). |
(*Probador) borrarPods |
method | |
(*Probador) borrarImagen |
method | borrarImagen deletes the test image from the registry. |
(*Probador) borrarManifiesto |
method | |
(*Probador) probarDNS |
method | probarDNS: the token in use sees the zone and can create and delete a test record in it; the target is an IP, resolves, or is auto. |
(*Probador) probarEmisor |
method | probarEmisor: the ClusterIssuer exists and cert-manager says it is ready. |
meta404 |
func | meta404 is a kind the cluster does not have (no cert-manager). |
(*Probador) probarAlmacen |
method | probarAlmacen: the StorageClass exists, and a small test volume of it binds (with a pod that uses it, when the class waits for one); then both are deleted. |
(*Probador) probarEntrada |
method | probarEntrada: the IngressClass exists, and a ready pod of its controller runs. |
listo |
func | |
Firmar |
func | Firmar signs a nonce as this platform: every process has the same key. |
LlaveDeIdentidad |
func | LlaveDeIdentidad is the key Firmar signs with: one every process of the platform has and nobody outside it does (from DATABASE_URL), never shown. |
(*Probador) probarDireccion |
method | probarDireccion: the address resolves, and answers over HTTPS (with a valid certificate) as this platform, so a typo cannot lock people out. |
recortar |
func | |
ptr |
func |
internal/probados/probados_test.go¶
514 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestValidar |
func | A value is checked before anything is tried, and the value in use is not a change. |
TestEmisor |
func | The issuer passes when it exists and is ready; only with the test's ficha, for the same value, is it saved, once, and the platform restarted. |
TestDosValoresOAmbos |
func | When one value of two cannot be saved, the other gets its old one back. |
(*fakeDNS) TestRecord |
method | |
TestDNS |
func | |
TestRegistro |
func | A registry passes when it answers, BuildKit pushes to it, every node that runs apps pulls the test image (a cordoned one is left out), and the image is deleted; the test's pods are cleaned up either way. |
TestAlmacen |
func | A storage class that waits for a consumer gets a pod for its test volume; the volume and the pod go afterwards. |
TestEntrada |
func | An ingress class passes when it exists and its controller runs. |
TestDireccion |
func | A new address must answer, over HTTPS, as this platform: another server, or another rendimiento, does not pass. |
TestAlArrancar |
func | At start the saved values win over the ConfigMap's, unless TESTED_SETTINGS=ignore. |
internal/problems¶
Package problems keeps the platform's own warnings and errors for the Problems page: a slog handler passes every record on to the real log and also queues warnings and errors; a Recorder stores them, folding repeats of the same problem into one row with a count.
internal/problems/problems.go¶
245 lines
| Name | Kind | Summary |
|---|---|---|
Recorder |
struct | Recorder queues problems from its Handler and stores them in Run. |
NewRecorder |
func | NewRecorder returns a Recorder that buffers up to 256 problems until Run starts storing them; beyond that, problems are counted and dropped rather than ever slowing the logging caller. |
(*Recorder) Handler |
method | Handler wraps h: every record still goes to h, and warnings and errors are also queued for the Problems page. |
(*Recorder) Run |
method | Run stores queued problems until ctx ends, and deletes the ones older than Keep every hour. |
(*Recorder) add |
method | add queues a problem to be saved; when the queue is full it is counted as dropped rather than holding up the code that logged it. |
handler |
struct | |
(*handler) Enabled |
method | Enabled is the wrapped handler's. |
(*handler) WithAttrs |
method | WithAttrs keeps the attributes for problems too. |
(*handler) WithGroup |
method | WithGroup prefixes later attributes with the group's name, as slog does. |
(*handler) Handle |
method | Handle logs the record as usual and, for warnings and errors, records it as a problem on the Problems page. |
prefixed |
func | prefixed adds a group prefix to attribute keys. |
FromRecord |
func | FromRecord turns a warning or error into a Problem; ok is false for the routine ones that are not worth showing. |
ignored |
func | ignored are warnings and errors that are routine or shown elsewhere: - optimistic-concurrency conflicts, which the controllers retry at once; - services going down, which the Reliability tab already tracks as outages; - work stopped because the platform is shutting down. |
normalize |
func | normalize replaces what changes between repeats of a problem (numbers, hashes, UUIDs) with #, so repeats count as one. |
clip |
func | clip cuts s to n bytes, saying how much was left out. |
internal/problems/problems_test.go¶
101 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestHandlerQueuesWarningsAndErrors |
func | Warnings and errors are queued with their app, component and error; everything still reaches the real log. |
TestFingerprintFoldsRepeats |
func | Repeats that differ only in numbers or hashes share a fingerprint; a different app or message does not. |
TestIgnoresRoutineRecords |
func | Routine conflicts and outages (shown on the Reliability tab) are not problems. |
TestGroupsAndFullQueue |
func | Fields inside a group keep the group's name; a full queue drops instead of blocking. |
TestLogOnlyIsNotAProblem |
func | A warning marked LogOnly stays in the log and off the Problems page. |
internal/pruebas¶
Package pruebas judges an app's own tests after a release: it reads the line each test printed, and keeps for each test whether it only reports (advisory), may roll a release back (blocking), or is set aside (quarantined) because it fails and then passes on its own.
internal/pruebas/pruebas.go¶
121 lines
| Name | Kind | Summary |
|---|---|---|
Result |
struct | Result is one test's outcome in a release. |
State |
struct | State is what is kept of a test between releases. |
Parse |
func | Parse reads the tests' lines from the task's log; reported is false when the tests left no report (they did not run). |
Judge |
func | Judge moves each test's state with this release's results: failures are the blocking tests that failed (they roll the release back), warnings what a person should know. |
internal/pruebas/pruebas_test.go¶
62 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestParse |
func | |
TestJudge |
func | A test reports until it passes N releases in a row, then blocks; a blocking failure fails the release; flaky runs set it aside. |
internal/registro¶
Package registro keeps the image registry from filling up.
internal/registro/plan.go¶
202 lines
| Name | Kind | Summary |
|---|---|---|
Tag |
struct | Tag is one tag of a repository in the registry and the manifest it points to, with when it was last pushed. |
Listing |
struct | Listing is what the registry holds, read from its storage: every tag, every manifest revision, what each index points to, revision links left empty (a push cut short by a full disk), and the disk's use. |
InUse |
struct | InUse is what must stay: the tags and digests any workload in the cluster, or a recent release, refers to. |
Plan |
struct | Plan is what a cleanup removes: tags, and manifest revisions nothing keeps any more (their layers are then freed by the garbage collector). |
Decide |
func | Decide plans a cleanup. |
Script |
func | Script is the shell that carries the plan out under root (the registry's repositories folder): it first repairs the empty revision links (each holds its own digest), then removes the planned tags and revisions. |
Parse |
func | Parse reads the listing script's output: "T repo tag digest unixtime", "R repo hex", "E repo hex" (an empty revision link), "C hex digest…" and "D used free". |
Ref |
func | Ref splits an image reference in registry host's into its repository, tag and digest; ok is false for an image from elsewhere. |
internal/registro/registro.go¶
325 lines
| Name | Kind | Summary |
|---|---|---|
Releases |
interface | Releases gives the images of each app's last releases. |
Runs |
interface | Runs tells whether a build may be pushing right now. |
Cleaner |
struct | Cleaner cleans the registry once a night. |
Result |
struct | Result is what one cleanup did. |
(*Cleaner) Run |
method | Run cleans every night at c.At until ctx ends. |
(*Cleaner) next |
method | next is the next time of day c.At, in c.TZ, after now (03:30 when unset or wrong). |
(*Cleaner) Clean |
method | Clean cleans the registry once: reads it, plans, repairs and removes, and collects the garbage. |
share |
func | share is the part of the disk in use. |
(*Cleaner) inUse |
method | inUse gathers every image the cluster's workloads name (running or not: a deployment scaled to zero, a cron job, an old replica set kept for a rollback) and those of each app's last releases. |
(*Cleaner) pod |
method | pod finds the registry's running pod. |
(*Cleaner) exec |
method | exec runs a shell command in the registry's pod (with stdin, when given) and returns what it printed. |
internal/registro/plan_test.go¶
119 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestDecide |
func | The plan keeps the newest build tags, other tags, what is in use and what a kept index lists; it removes the rest, and the manifests (old caches) no tag points to. |
TestScriptRefusesOddNames |
func | Nothing that could leave the registry's folder gets into the script. |
TestRef |
func | |
TestNext |
func | The cleanup runs at its time of day, today or else tomorrow. |
internal/registrocentral¶
Package registrocentral keeps the platform's own log in one place: a slog handler passes every record on to the real log (stdout) and also queues each one at INFO and above, its secrets removed; a Recorder stores them in Postgres for the Log page, so a restarted pod no longer loses its lines and every process can be read together.
internal/registrocentral/registrocentral.go¶
355 lines
| Name | Kind | Summary |
|---|---|---|
Store |
interface | Store is where lines are kept: *store.Store, or a stand-in in tests. |
Recorder |
struct | Recorder queues lines from its Handler and stores them in Run. |
NewRecorder |
func | NewRecorder returns a Recorder whose lines say they come from process unless they carry a role attribute. |
newRecorder |
func | |
(*Recorder) Handler |
method | Handler wraps h: every record still goes to h, and those at INFO and above are also queued for the Log page. |
(*Recorder) Dropped |
method | Dropped is how many lines were dropped and not yet reported. |
(*Recorder) add |
method | add queues a line; when the queue is full it is counted as dropped. |
(*Recorder) Run |
method | Run stores queued lines until ctx ends, and deletes the ones older than Keep every hour. |
(*Recorder) write |
method | write stores a batch; down says the last write failed. |
handler |
struct | |
(*handler) Enabled |
method | Enabled is INFO and above, and whatever the wrapped handler wants: the log keeps INFO even where stdout is quieter. |
(*handler) WithAttrs |
method | WithAttrs keeps the attributes for the log too. |
(*handler) WithGroup |
method | WithGroup prefixes later attributes with the group's name, as slog does. |
(*handler) Handle |
method | Handle logs the record as usual and queues it for the Log page. |
prefixed |
func | prefixed adds a group prefix to attribute keys. |
FromRecord |
func | FromRecord turns a record into a line of the log: the role attribute is its process (else process), app and run have their own columns, the rest are its attributes. |
levelName |
func | |
value |
func | value is what an attribute keeps: numbers and booleans as they are, the rest as cleaned text; nothing at all of a key that names a credential. |
Sensitive |
func | Sensitive reports whether an attribute's key names a credential: token, secret, password, authorization, cookie, key and the like ("key", "signing_key", "privateKey"). |
Clean |
func | Clean is text as the log keeps it: a password in a URL taken out, all of it replaced when the Ruta's check (ruta.LooksSecret, the one that refuses entries with secrets) says it seems to hold a credential, and cut to n bytes. |
clip |
func | clip cuts s to n bytes (at a character's start), saying how much was left out. |
internal/registrocentral/registrocentral_test.go¶
262 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestHandlerQueuesInfoAndAbove |
func | Every record at INFO and above is queued with its process, app, run and attributes; debug is not; everything still reaches the real log. |
TestRedaction |
func | Secrets never reach the table: values the Ruta's check flags, values of keys that name credentials, passwords in URLs, and messages too. |
TestBounds |
func | Messages, values and attributes are bounded. |
TestKeepsInfoUnderAQuietLog |
func | Where stdout is quieter (WARN), the log still keeps INFO. |
TestDropsWhenFull |
func | When the writer is behind, lines are dropped and counted, never waited for. |
TestDatabaseDownThenBack |
func | While the database is down, lines are dropped (said once on stdout); when it answers again, how many were dropped is written as a line. |
internal/render¶
Package render turns an app's spec plus its released images into the Kubernetes objects that run it.
internal/render/frontera.go¶
108 lines
| Name | Kind | Summary |
|---|---|---|
OrgNetwork |
struct | OrgNetwork is the network boundary between organizations. |
lanPeer |
struct | lanPeer is a lan: service's pods and port: the LAN reaches them through the load balancer, from addresses no namespace selector matches. |
networkPolicies |
func | networkPolicies are the policies of an app's namespace: the organization's boundary, and one per lan: service opening its port to everyone. |
internal/render/needs.go¶
149 lines
| Name | Kind | Summary |
|---|---|---|
NeedServices |
func | NeedServices are the services rendimiento runs for the app's needs: one Postgres and one Redis per app, shared by every service that needs them. |
needKind |
func | needKind is name when it is a database or cache this app runs (postgres, redis), else "". |
orDefault |
func | orDefault is v, or def when v is "". |
withNeeds |
func | withNeeds adds the need services and, to every service that needs something, the variables to reach it. |
copyMap |
func | copyMap is a copy of m. |
NeedRefs |
func | NeedRefs lists the other services an app's services need, as written ("namespace/name" or a same-app "name"), sorted and unique. |
internal/render/observe.go¶
125 lines
| Name | Kind | Summary |
|---|---|---|
Telemetry |
struct | Telemetry is where observed services send their traces (an OpenTelemetry collector) and the agents that instrument them without code changes. |
DefaultAgents |
func | DefaultAgents are the OpenTelemetry auto-instrumentation images, built for arm64 and amd64. |
agent |
struct | agent is how one language's agent is copied into the pod and loaded. |
observe |
func | observe makes a Deployment send traces: the OTEL_* variables every SDK reads (the service is named app/service, the node ID on the Universe map) and, for Java, Node and Python, an init container that copies the agent into a shared folder plus the variable that loads it. |
setEnv |
func | setEnv sets a container variable. |
internal/render/render.go¶
718 lines
| Name | Kind | Summary |
|---|---|---|
Options |
struct | Options carries cluster-level settings, so nothing is hardcoded per app. |
LocalHost |
func | LocalHost reports whether a host is a name every computer resolves to itself: nothing to put in DNS, and no certificate to ask for. |
(Options) Published |
method | Published returns an app's services as they are published. |
(Options) URL |
method | URL is the address a host is published at: HTTPS, or plain HTTP for a local name and where the cluster has no issuer of certificates. |
GPUProfile |
struct | GPUProfile is how this cluster attaches a GPU to a pod. |
DefaultOptions |
func | DefaultOptions are this cluster's defaults: ingress-nginx, letsencrypt-prod, Longhorn. |
Input |
struct | Input is one app release: its spec and the image reference for each service. |
Objects |
struct | Objects returns the namespace first, then each service's objects in a stable order. |
Render |
func | Render returns every object an app release needs: namespace, deployments, services, ingresses, volumes and cron jobs, including the database and cache its needs ask for. |
jobImage |
func | jobImage resolves a job's image: its service's, its own build, or as given. |
cronJob |
func | cronJob is a job of the app: a CronJob in its namespace running the job's image (its own build or the app's) on its schedule. |
appLabels |
func | appLabels mark everything rendimiento makes for an app. |
svcLabels |
func | svcLabels are an app's labels plus its service's, including the standard app.kubernetes.io ones other tools read. |
selector |
func | selector picks a service's pods; it never changes once a Deployment exists, since Kubernetes does not allow it. |
deployment |
func | deployment runs a service: its image, port, command, environment and secrets, size (requests and limits), replicas, health checks, volume and GPU, keeping the last 5 versions for rollbacks. |
attachGPU |
func | attachGPU gives the service's container its GPUs and what the cluster's GPU profile needs (runtime class, host paths, shared memory, environment). |
lanService |
func | lanService exposes a service on the local network: a LoadBalancer Service (MetalLB gives it an address from its pool, the requested one if set). |
env |
func | env is a service's environment: PORT first, then its env in name order, then its secretEnv as references to Kubernetes secrets (values never appear in the object). |
service |
func | service exposes port 80 and, when different, the app's own port, so other services can keep calling it as before (e.g. |
merge |
func | merge is a copy of a with b's keys added over it. |
ingress |
func | ingress publishes a service on its domain, aliases and routes over HTTPS: cert-manager issues the certificate, HTTP redirects to HTTPS, and the service's own ingress annotations are added. |
tls |
func | tls is the ingress's certificates: one secret per group of hosts. |
(Options) CertSecrets |
method | CertSecrets are the secrets of the certificates a service waits for. |
requirements |
func | requirements builds requests and limits, leaving out unset ("") values. |
rules |
func | rules is the ingress's hosts, each with the paths that go to the service (/ for its domain and aliases, and the paths of its routes). |
volume |
func | volume is a service's persistent disk: a claim of its size in the storage class rendimiento uses, mounted by one pod at a time. |
ptr |
func | ptr returns a pointer to a copy of v. |
(*Objects) List |
method | List returns every object in apply order: namespace, volumes, workloads, services, ingresses. |
(*Objects) YAML |
method | YAML renders all objects as a multi-document manifest (for previews and tests). |
internal/render/ejemplos_test.go¶
59 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestEjemplos |
func | Every example that runs something renders. |
internal/render/frontera_test.go¶
84 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestRenderOrgNetwork |
func | The boundary between organizations: the namespace carries its organization, and with OrgNetwork on its policy lets in only its own pods, its organization's namespaces and the ones the operator lists; a lan: service's port is open to everyone. |
internal/render/observe_test.go¶
105 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestRenderObserve |
func |
internal/render/render_test.go¶
494 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestRenderGolden |
func | |
TestRenderMissingImage |
func | |
TestRenderAdoptedSelectorAndExistingClaim |
func | An adopted Deployment keeps its immutable selector; pods carry both label sets and the Service selects the old one, so old and new pods overlap. |
TestRenderPodoi |
func | |
TestRenderJobs |
func | |
TestRenderStockpulse |
func | |
TestRenderRoutes |
func | |
TestRenderGPU |
func | |
TestRenderNeeds |
func | |
TestRenderLAN |
func | |
TestRenderLocal |
func | A cluster on the person's own computer: the first service answers at |
internal/renovate¶
Package renovate is the Renovate add-on: it keeps the dependencies of the apps it is switched on for up to date by running Renovate on a schedule.
internal/renovate/renovate.go¶
1033 lines
| Name | Kind | Summary |
|---|---|---|
Settings |
struct | Settings are the add-on's configuration. |
DefaultSettings |
func | DefaultSettings are the add-on's settings before anyone changes them. |
(Settings) Validate |
method | Validate checks the schedule, image, repositories and config. |
(Settings) Next |
method | Next is the first scheduled time after t. |
Load |
func | Load returns the add-on's state, with defaults if it was never set up. |
Runner |
struct | Runner starts Renovate runs on schedule or on request, one at a time. |
(*Runner) Serve |
method | Serve answers the other processes' Start and Running (see Remote) until ctx ends. |
(*Runner) Loop |
method | Loop starts scheduled runs until ctx ends. |
(*Runner) tick |
method | tick starts a scheduled Renovate run when its time has come. |
Connection |
interface | Connection is a forja other than GitHub, for Renovate: what a run on its connection installation's repositories needs, with a token that lasts at least last. |
target |
struct | target is one pod of a run: an account's repositories on GitHub (forja ""), or a connection's on another forja. |
(*Runner) Repos |
method | Repos lists what a run would cover: apps with Renovate switched on, plus the extra repositories. |
(*Runner) Start |
method | Start begins a run in the background and returns its record. |
(*Runner) targets |
method | targets groups repositories by what reaches them: the GitHub App installation of their account, or their app's connection on GitLab or Bitbucket. |
(*Runner) otherTargets |
method | otherTargets groups the apps on GitLab and Bitbucket with Renovate on by their connection. |
(*Runner) gitHubTargets |
method | gitHubTargets groups repositories by the GitHub App installation that can reach them. |
(*Runner) execute |
method | execute is one Renovate run: a pod per account it covers, one after another, then the run's summary and results are saved (55 minutes at most by default). |
(*Runner) warnArtifactErrors |
method | warnArtifactErrors puts every lockfile Renovate could not update on the Problems page, with the app it belongs to. |
MissingPermissions |
func | MissingPermissions lists what the installation still lacks. |
(*Runner) Problems |
method | Problems explains what would stop a run right now, such as permissions the GitHub App's installations have not been granted yet. |
RepoResult |
struct | RepoResult is what one run did to one repository. |
ArtifactError |
struct | ArtifactError is one lockfile Renovate could not update on one branch. |
summarize |
func | summarize is a run's one line: pull requests opened, merged by itself, and repositories that failed. |
(*Runner) runPod |
method | runPod runs Renovate for one account's repositories in a pod, with a fresh token of that installation (as the App's bot), and reads back what it did from its log. |
(*Runner) runForjaPod |
method | runForjaPod runs Renovate for a GitLab or Bitbucket connection's repositories, with its token; what it did is read back in rendimiento's names of the repositories. |
(*Runner) podRun |
method | podRun runs one Renovate pod with token and the platform's env, waits for it, and reads what it did. |
gitHubEnv |
func | gitHubEnv is Renovate on GitHub, as the App's bot. |
forjaEnv |
func | forjaEnv is Renovate on GitLab or Bitbucket: the platform and its API's address. |
statusChecksEnv |
func | statusChecksEnv is what an installation that may only read commit statuses needs. |
(*Runner) pod |
method | pod is the Renovate pod: its configuration and token from a secret of the same name, the repositories to look at, and a deadline. |
(*Runner) wait |
method | wait checks the pod every 5 seconds until it ends. |
(*Runner) collect |
method | collect reads the pod's JSON log into readable text and per-repo results. |
Parse |
func | Parse turns Renovate's JSON log (LOG_FORMAT=json) into readable lines and a result per repository. |
addArtifactErrors |
func | addArtifactErrors reads the lockfiles a warning says Renovate could not update: "artifactErrors" (a pull request was opened or updated anyway) has them in artifactErrors, "Branch not created because artifact update failed" in errors. |
rawArtifactError |
struct | |
errorLines |
func | errorLines keeps what says why a tool failed: the lines that mention an error (npm prints many warnings first), or else the first lines, bounded. |
extraFields |
func | extraFields renders a log entry's remaining fields (e.g. |
firstNonEmpty |
func | firstNonEmpty is the first of v that is not "". |
truncate |
func | truncate keeps the start and end of a long log. |
(*Runner) cleanup |
method | cleanup deletes Renovate pods and secrets a previous process left behind. |
(*Runner) Running |
method | Running reports whether a run is in progress in this process. |
ptr |
func | ptr returns a pointer to a copy of v. |
internal/renovate/renovate_test.go¶
177 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestParse |
func | |
TestSettings |
func | |
TestPod |
func | |
TestParseKeepsErrorDetails |
func | |
TestMissingPermissions |
func | |
TestParseArtifactErrors |
func | Renovate opened a pull request whose lockfile it could not regenerate (npm's peer-dependency conflict), and in another repository did not open the branch at all; both are kept per repository, briefly. |
TestErrorLinesBounded |
func | |
TestStatusChecksEnv |
func | An installation that may only read commit statuses must not have Renovate set them: that call fails and Renovate abandons the repository. |
TestWarnArtifactErrors |
func |
internal/ruta¶
Package ruta is the MCP endpoint (/mcp) through which agents read and write la Ruta: what the platform's people and agents know, kept in the platform rather than in any one agent's session.
internal/ruta/comentarios.go¶
179 lines
| Name | Kind | Summary |
|---|---|---|
Comentarios |
interface | Comentarios is where people's comments on agents' work live (the store): on a handed-over cargo or on an encargo, without sending it back. |
ComentarioOut |
struct | ComentarioOut is a comment as agents see it. |
comentarioOut |
func | |
comentariosIn |
struct | |
comentariosOut |
struct | |
responderIn |
struct | |
(*Server) addComentarioTools |
method | addComentarioTools registers the comment tools: reading a thread for any key, answering for keys that write, inside a cargo. |
visible |
func | visible reports whether the key may see a comment: its organization's, and of an app it may see. |
(*Server) comentariosLeer |
method | comentariosLeer (comentarios_leer) is the thread of a cargo or an encargo. |
(*Server) comentarioResponder |
method | comentarioResponder (comentario_responder) answers a person's comment, in the agent's cargo. |
(*Server) sinResponder |
method | sinResponder are people's comments no agent has answered, for ruta_inicio: the ones on this key's own work first. |
(*Server) hiloEncargo |
method | hiloEncargo is an encargo's thread (nil when comments are off). |
nuevos |
func | nuevos are the people's comments in a thread no agent has answered yet. |
internal/ruta/encargos.go¶
440 lines
| Name | Kind | Summary |
|---|---|---|
Encargos |
interface | Encargos is where encargos live (the store): work asked of agents, with an owner and a life cycle. |
EncargoOut |
struct | EncargoOut is an encargo as agents see it. |
SucesoOut |
struct | SucesoOut is one step of an encargo's history. |
encargoOut |
func | |
encargosIn |
struct | |
encargosOut |
struct | |
encargoIn |
struct | |
crearEncargoIn |
struct | |
esperarIn |
struct | |
esperarOut |
struct | |
entregarEncargoIn |
struct | |
soltarIn |
struct | |
(*Server) addEncargoTools |
method | addEncargoTools registers the encargo tools: reading them for any key; creating, taking, waiting, handing over and letting go for keys that write, inside a cargo. |
(*Server) encargoFor |
method | encargoFor reads an encargo the key may see (its app, if any). |
stateErr |
func | stateErr explains a change the encargo's state does not allow. |
(*Server) encargosListar |
method | encargosListar (encargos_listar) lists encargos the key may see. |
(*Server) encargoLeer |
method | encargoLeer (encargo_leer) is one encargo with its history. |
(*Server) encargoCrear |
method | encargoCrear (encargo_crear) leaves work for later, in the agent's cargo. |
askedBy |
func | askedBy names who asked for an encargo an agent created: the person who made the agent's key, through which agent ("p0dxD · Claude in main"), since a person often leaves work for agents from their own Claude Code or Codex. |
(*Server) encargoTomar |
method | encargoTomar (encargo_tomar) takes a pending encargo in the agent's cargo. |
(*Server) mine |
method | mine checks the encargo is the agent's, taken or waiting. |
finished |
func | |
(*Server) encargoEsperar |
method | encargoEsperar (encargo_esperar) waits for a run of the agent's encargo to finish, up to 50 seconds a call: the encargo shows it is waiting, and the run's end (from the platform's events) wakes the call. |
(*Server) comentariosNuevos |
method | comentariosNuevos adds to a wait's answer what people said about the encargo that no agent answered yet. |
(*Server) encargoEntregar |
method | encargoEntregar (encargo_entregar) hands the agent's encargo over. |
(*Server) encargoSoltar |
method | encargoSoltar (encargo_soltar) lets go of the agent's encargo, with why. |
(*Server) encargosDe |
method | encargosDe summarizes encargos for ruta_inicio: pending ones the key may take, and the ones it has. |
internal/ruta/esquemas.go¶
67 lines
| Name | Kind | Summary |
|---|---|---|
outputSchemaFor |
func | outputSchemaFor is the output schema the SDK would infer for Out, with its objects open to fields it does not name (nil when it cannot be inferred: the SDK then infers it itself). |
abrir |
func | abrir opens every object of a schema to fields it does not name, keeping what a map's values must be. |
internal/ruta/ingles.go¶
187 lines
| Name | Kind | Summary |
|---|---|---|
schemaFor |
func | schemaFor is the input schema the MCP SDK would infer for In (nil when it cannot: the SDK then infers it itself). |
(*Server) enIngles |
method | enIngles is t with its description, and its arguments' descriptions in in, in English. |
(*Server) traducir |
method | traducir puts a schema's descriptions in English, its properties' and items' too. |
internal/ruta/libreta.go¶
86 lines
| Name | Kind | Summary |
|---|---|---|
PedidoOut |
struct | PedidoOut is one line of an app's libreta. |
LibretaOut |
struct | LibretaOut is an app's libreta: what is open, and what was finished or set aside in the last week. |
libretaOut |
func | libretaOut is the libreta in the agents' words. |
internal/ruta/mercado.go¶
196 lines
| Name | Kind | Summary |
|---|---|---|
Mercado |
interface | Mercado is what the mercado_* tools need (a *mercado.Mercado); without it (PAGES_ORG unset) the tools are left out. |
(*Server) addMercadoTools |
method | addMercadoTools registers the Mercado's tools: listing and reading stalls for every key; changing and opening them for a key that can write, within a cargo. |
puestosOut |
struct | |
puestoIn |
struct | |
paginaOut |
struct | |
editarPuestoIn |
struct | |
abrirPuestoIn |
struct | |
nuevaPaginaIn |
struct | nuevaPaginaIn is a new page as an agent writes it: only the kind and the name are required; the Mercado fills in the rest (language, palette…). |
abrirPuestoOut |
struct | |
(*Server) puestos |
method | |
(*Server) leerPuesto |
method | |
(*Server) editarPuesto |
method | |
(*Server) abrirPuesto |
method | |
puestoKey |
func | puestoKey refuses a stall (an app) the key's app list leaves out. |
mercadoKey |
func | mercadoKey refuses the Mercado to keys of other organizations: the Mercado's stalls are the platform's own (its organization's). |
internal/ruta/plataforma.go¶
560 lines
| Name | Kind | Summary |
|---|---|---|
Plataforma |
interface | Plataforma is what the platform's tools read and do: the apps, their runs, releases, logs, kept requests and problems, and running or cancelling CI. |
appIn |
struct | |
ejecucionIn |
struct | |
registroIn |
struct | |
solicitudesIn |
struct | |
solicitudIn |
struct | |
lanzarIn |
struct | |
Corrida |
struct | Corrida is a run as agents see it. |
Paso |
struct | Paso is one step of a run. |
Version |
struct | Version is a release as agents see it. |
AppResumen |
struct | AppResumen is one app in apps_listar. |
appsOut |
struct | |
Problema |
struct | Problema is a problem the platform recorded. |
estadoOut |
struct | |
LineaMesa |
struct | LineaMesa is a line of the work board as agents see it. |
mesaOut |
struct | |
registroOut |
struct | |
solicitudesOut |
struct | |
solicitudOut |
struct | |
corrida |
func | |
version |
func | |
short |
func | |
(*Server) addPlataformaTools |
method | addPlataformaTools registers the platform's tools: reading for any key, running and cancelling CI for keys that write (with a cargo). |
(*Server) mesaLeer |
method | mesaLeer (mesa_leer) is an app's work board. |
(*Server) appFor |
method | appFor finds an app the key may use. |
(*Server) runFor |
method | runFor finds a run of an app the key may use. |
(*Server) resumen |
method | |
(*Server) appsListar |
method | appsListar (apps_listar) lists the apps the key may see. |
(*Server) appEstado |
method | appEstado (app_estado) is one app: services, recent runs and releases, and its open problems. |
(*Server) ejecucionLeer |
method | ejecucionLeer (ejecucion_leer) is one run with its steps. |
(*Server) pasoRegistro |
method | pasoRegistro (paso_registro) is the end of a step's log. |
(*Server) visibleApps |
method | visibleApps are the apps a key may see: its organization's, narrowed to the key's apps if it has a list. |
traceAllowed |
func | traceAllowed says whether a request went through one of the visible apps (services are app/service). |
(*Server) solicitudesListar |
method | solicitudesListar (solicitudes_listar) lists kept requests. |
(*Server) solicitudLeer |
method | solicitudLeer (solicitud_leer) is one kept request with its spans. |
(*Server) ejecucionLanzar |
method | ejecucionLanzar (ejecucion_lanzar) queues a run of a branch other than the default one: agents test; deploying stays with people. |
(*Server) ejecucionReintentar |
method | ejecucionReintentar (ejecucion_reintentar) runs again what did not pass in a failed run of a branch; a run of the main branch deploys, and that is a person's. |
(*Server) ejecucionCancelar |
method | ejecucionCancelar (ejecucion_cancelar) cancels a queued or running run. |
internal/ruta/platicas.go¶
180 lines
| Name | Kind | Summary |
|---|---|---|
Platicas |
interface | Platicas are the conversations about Ruta entries (the store): a person may choose their own agent («Mi agente») to answer one instead of one of the platform's AIs; the agent finds the ones waiting for it here and answers them, signed with its key's name. |
MensajeOut |
struct | MensajeOut is a message of a conversation as agents see it, signed. |
PlaticaOut |
struct | PlaticaOut is a conversation waiting for an agent: the entry it is about, «la idea hasta ahora», and its last messages, oldest first. |
platicasOut |
struct | |
platicaResponderIn |
struct | |
init |
func | |
(*Server) addPlaticaTools |
method | addPlaticaTools registers the conversation tools: listing those waiting for any key, answering for keys that write, inside a cargo. |
mensajeOut |
func | |
(*Server) platicaFor |
method | platicaFor is a conversation the key may see and answer: its organization's, about an entry of an app it may see, waiting for an agent. |
(*Server) platicasEsperando |
method | platicasEsperando (platicas_esperando) lists the conversations waiting for an agent, with their last 20 messages. |
(*Server) platicaResponder |
method | platicaResponder (platica_responder) answers a conversation that chose the person's own agent, signed with the key's name, in its cargo. |
internal/ruta/produccion.go¶
91 lines
| Name | Kind | Summary |
|---|---|---|
Produccion |
interface | Produccion is what the production tools need: an agent may ask for a change to production, never make it. |
pedirIn |
struct | |
esperarAprobacionIn |
struct | |
(*Server) addProduccionTools |
method | addProduccionTools adds produccion_pedir and produccion_esperar, for keys that write. |
(*Server) produccionPedir |
method | produccionPedir (produccion_pedir) asks a person to roll an app back. |
(*Server) produccionEsperar |
method | produccionEsperar (produccion_esperar) waits for a person's decision. |
(*Server) pausaAprobacion |
method | pausaAprobacion is the wait between looks at a request (short in tests). |
internal/ruta/ruta.go¶
839 lines
| Name | Kind | Summary |
|---|---|---|
Backend |
interface | Backend is the storage the endpoint needs; *store.Store implements it. |
NewToken |
func | NewToken returns a fresh agent key and the hash to store. |
HashToken |
func | HashToken is how agent keys are stored and looked up. |
Server |
struct | Server serves /mcp. |
keyInfo |
struct | |
(*Server) Handler |
method | Handler returns the /mcp handler: bearer-token auth, then a stateless MCP server with the tools the key may use. |
(*Server) verify |
method | verify checks an agent's key on each MCP request: it must start with the key prefix, exist (only its hash is stored) and not be revoked; its name and whether it can write go along with the request. |
keyFrom |
func | keyFrom is the agent key a tool call came with (see verify). |
Summary |
struct | Summary is an entry without its full body. |
Entry |
struct | Entry is a full entry. |
CargoOut |
struct | CargoOut is a cargo as agents see it. |
empty |
struct | |
InicioOut |
struct | InicioOut is ruta_inicio's answer. |
buscarIn |
struct | |
listaOut |
struct | |
leerIn |
struct | |
tomarIn |
struct | |
tomarOut |
struct | |
anotarIn |
struct | |
actualizarIn |
struct | |
entregarIn |
struct | |
summary |
func | summary is an entry as lists show it: its first 200 characters. |
summaries |
func | summaries is summary for each entry. |
cargoOut |
func | cargoOut is a cargo (an agent's turn at work) as tools answer it. |
LooksSecret |
func | LooksSecret reports whether text seems to contain a credential. |
checkText |
func | checkText refuses an entry with no title, a title, body or tags over their limits, or anything that looks like a secret (a key or token). |
(*Server) newServer |
method | newServer is the MCP server agents talk to: the Ruta's tools (start, search, read; and, with a key that can write, take a cargo, note, update and hand over), each call audited. |
herramientas |
struct | herramientas is an MCP server being filled with tools, and the language of their descriptions. |
b2i |
func | |
addTool |
func | addTool registers a tool whose every call is recorded in the audit log. |
(*Server) audit |
method | audit records a tool call (who, which tool, its arguments cut to 2000 characters, and whether it worked) for the Ruta's Activity tab. |
(*Server) lastHandovers |
method | lastHandovers are the n most recent handed-over cargos, newest first. |
(*Server) inicio |
method | inicio (ruta_inicio) is where an agent starts: its open cargo if any, the last handovers, open to-dos and what changed recently. |
(*Server) buscar |
method | buscar (ruta_buscar) finds entries by text and kind, 20 by default. |
(*Server) leer |
method | leer (ruta_leer) reads one whole entry (not archived ones). |
(*Server) cargoFor |
method | writing needs a write key and an open cargo. |
(*Server) tomar |
method | tomar (cargo_tomar) opens a cargo with its purpose: the agent's turn, which every note it writes belongs to. |
cleanTags |
func | cleanTags lowercases and trims tags, dropping empty ones. |
(*Server) anotar |
method | anotar (ruta_anotar) writes a new entry (decision, manual, to-do, note) in the agent's open cargo. |
(*Server) linkCargo |
method | linkCargo links an entry written or changed in a cargo to the branches of its app the agent ran (ejecucion_lanzar) in it: the work it answers. |
(*Server) actualizar |
method | actualizar (ruta_actualizar) changes an entry, or marks a to-do done, within the agent's open cargo. |
(*Server) appOfEntry |
method | appOfEntry is the app an entry is to be about: "" for none; else one the key may see, by its own name when the platform's tools are on. |
checkRama |
func | checkRama tidies a branch to link to an entry: it needs the entry to be about an app, and a name git would take. |
(*Server) entregar |
method | entregar (cargo_entregar) closes the agent's cargo with what it did and what is left, for the next one. |
internal/ruta/comentarios_test.go¶
166 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestComentarioTools |
func | A person comments on an agent's encargo and on another agent's handover: the agent finds both at the start (its own first), reads them with the encargo, and answers inside a cargo; an answered comment no longer waits. |
internal/ruta/encargos_test.go¶
244 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestEncargoTools |
func | An agent finds a pending encargo at the start, takes it (and nobody else can), tests a branch, waits on the run (woken when it ends) and hands the encargo over with links. |
internal/ruta/ingles_test.go¶
89 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestIngles |
func | Every tool, with every optional part on, has its description and its arguments' descriptions in English; an agent whose address asks for English (or on an English platform) gets them, and the instructions, while the tools keep their names and still work. |
internal/ruta/mercado_test.go¶
137 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestMercadoTools |
func |
internal/ruta/plataforma_test.go¶
328 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPlataformaTools |
func | Agents read the platform (apps, runs, logs, kept requests) and, with a collaborator key and a cargo, test a branch or cancel a run; never the default branch, which deploys. |
internal/ruta/platicas_test.go¶
196 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPlaticasMiAgente |
func | «Mi agente»: a person's own agent finds the conversations that chose it and wait for it (the last word a person's), with their entry and idea; it answers inside a cargo, signed with its key's name, and may update the idea; it may not answer one the platform's AI answers, nor one of an app its key does not see, nor with a secret; a reading key only lists. |
TestPlaticasEnIngles |
func | The conversation tools have their English, arguments included. |
internal/ruta/produccion_test.go¶
110 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestProduccionTools |
func | An agent asks to roll back (with a cargo, on an app it may use), never does it, and waits for the person's decision; a reader has no such tool. |
internal/ruta/ruta_test.go¶
398 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestRutaAuth |
func | |
TestRutaCargoFlow |
func | |
TestLooksSecret |
func |
internal/secretos¶
Package secretos keeps the platform's own secrets (the GitHub App's credentials, organizations' AI keys) where there is no Kubernetes to keep them: sealed with AES-256-GCM in Postgres, by a key that lives outside the database, in a file only rendimiento reads.
internal/secretos/secretos.go¶
107 lines
| Name | Kind | Summary |
|---|---|---|
Almacen |
interface | Almacen is where sealed secrets are kept (*store.Store). |
Caja |
struct | Caja seals and opens secrets kept in an Almacen. |
Nueva |
func | Nueva makes a Caja with a 32-byte key. |
LeerLlave |
func | LeerLlave reads a key file: 32 random bytes in base64, as NuevaLlave writes them. |
NuevaLlave |
func | NuevaLlave is a new random key, in base64, for a key file. |
(*Caja) Leer |
method | Leer opens the secret; ok is false when there is none by that name. |
(*Caja) Guardar |
method | Guardar seals the value under the name, with a new random nonce. |
(*Caja) Borrar |
method | Borrar removes the secret. |
internal/secretos/usos.go¶
135 lines
| Name | Kind | Summary |
|---|---|---|
Credenciales |
struct | Credenciales keeps the GitHub App's credentials in the Caja (as api.CredentialStore). |
(Credenciales) Load |
method | Load returns the credentials, or nil before setup has run. |
(Credenciales) Save |
method | Save keeps the credentials the first time. |
LlavesIA |
struct | LlavesIA keeps each organization's own AI key in the Caja (as ia.SecretKeys does in Kubernetes); the UI only sees its last four characters. |
nombreIA |
func | |
(LlavesIA) OrgKey |
method | OrgKey is the organization's key ("" when it has none). |
(LlavesIA) KeyHint |
method | KeyHint is the key's last four characters ("" when none). |
(LlavesIA) SetOrgKey |
method | SetOrgKey keeps the organization's key; an empty one removes it. |
GitLab |
struct | GitLab keeps each GitLab connection's secret in the Caja (as api.GitLabSecrets does in Kubernetes). |
nombreGitLab |
func | |
(GitLab) Load |
method | Load is the connection's secret, nil when it has none. |
(GitLab) Save |
method | Save creates or replaces it. |
Bitbucket |
struct | Bitbucket keeps each Bitbucket connection's secret in the Caja (as api.BitbucketSecrets does in Kubernetes). |
nombreBitbucket |
func | |
(Bitbucket) Load |
method | Load is the connection's secret, nil when it has none. |
(Bitbucket) Save |
method | Save creates or replaces it. |
internal/secretos/secretos_test.go¶
122 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCaja |
func | A value is kept sealed, opens only with its key and under its own name, and two seals of the same value differ. |
TestUsos |
func | The GitHub App's credentials are kept once and never replaced; an organization's AI key shows only its end and an empty one removes it. |
internal/selfupdate¶
Package selfupdate moves rendimiento to an image it built and tested itself: its own repository's builds: entry (SELF_APP), released like any app's.
internal/selfupdate/selfupdate.go¶
291 lines
| Name | Kind | Summary |
|---|---|---|
Releases |
interface | Releases is what the updater reads from the store. |
Updater |
struct | |
Changes |
interface | Changes is the part of the GitHub client the manifest check uses. |
Manifests |
struct | Manifests says whether make deploy is needed: the files of the platform's manifests (deploy/) that changed between the commit it last applied and the newest release. |
Version |
struct | Version is one release of the platform. |
Status |
struct | |
(*Updater) Status |
method | Status says which release runs (by the pod's image digest) and whether the newest release holds another image. |
(*Updater) status |
method | status reads Status anew. |
(*Updater) manifests |
method | manifests compares the commit make deploy last applied with head. |
isManifest |
func | isManifest says whether make deploy applies the file: the YAML under deploy/ (not, say, the Railpack image's Dockerfile). |
(*Updater) Update |
method | Update points the platform's Deployments at release's image. |
(*Updater) patch |
method | patch points one Deployment's container at v's image. |
(*Updater) versions |
method | versions are the app's releases that hold a platform image, newest first. |
(*Updater) running |
method | running is the digest of the image this pod runs ("" when unknown: not in a pod, or the image is still being pulled). |
digest |
func | digest is the sha256:… of an image reference or a container's image ID. |
internal/selfupdate/selfupdate_test.go¶
235 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestStatus |
func | |
TestUpdate |
func | |
TestUpdateEveryService |
func | The platform's other services move to the same image; one that is not deployed (everything in one Deployment) is skipped. |
TestManifests |
func | |
TestStatusIsKept |
func | Status is kept a while (the page does not wait for the cluster and GitHub on each look), and an update forgets it. |
internal/senales¶
Package senales sends this installation's señales de vida: once a week, a few anonymous counts to rendimiento.ai, so the project knows how many installations are alive, and nothing else.
internal/senales/comentarios.go¶
315 lines
| Name | Kind | Summary |
|---|---|---|
DatosComentario |
struct | DatosComentario are the installation's data a comment carries. |
ComentarioSaliente |
struct | ComentarioSaliente is a comment exactly as it goes. |
(*Enviador) Comentario |
method | Comentario is the comment that would go with this text: what the person sees before sending (with FichaVista for the hash). |
(*Enviador) comentariosURL |
method | |
(*Enviador) client |
method | |
(*Enviador) EnviarComentario |
method | EnviarComentario sends a comment now: the number rendimiento.ai gave it, and the token to keep for its answer. |
RespuestaRecibida |
struct | RespuestaRecibida is a person's answer to a comment, as it came. |
(*Enviador) PedirRespuesta |
method | PedirRespuesta asks rendimiento.ai for the answer to comment remoto, with its token: ok is false while there is none yet. |
ComentariosStore |
interface | ComentariosStore is where this installation keeps its comments. |
Recogida |
struct | Recogida is when this installation asks for its comments' answers; the zero value is the schedule above. |
(*Recogida) ahora |
method | |
porOmision |
func | |
(*Recogida) Toca |
method | Toca is whether comment c is asked about now: always the first time since this process started, then once its interval has passed (a minute's slack, so a tick a little early still counts). |
(*Recogida) anotar |
method | |
(*Recogida) olvidar |
method | olvidar drops the comments that no longer wait. |
(*Recogida) PuedePagina |
method | PuedePagina is whether opening the page may ask now (at most once per Pagina), and notes that it does. |
(*Enviador) RecogerRespuestas |
method | RecogerRespuestas asks for the answers of the comments that wait for one (see Recogida for when) until ctx ends. |
(*Enviador) Recoger |
method | Recoger asks once for every answer that is missing, and keeps those that came. |
(*Enviador) RecogerAlVer |
method | RecogerAlVer asks for the missing answers because a person opened their comments: at most once per RespuestasPagina, and for no longer than espera, so the page does not wait long. |
(*Enviador) recoger |
method | |
(*Enviador) pedir |
method |
internal/senales/senales.go¶
210 lines
| Name | Kind | Summary |
|---|---|---|
Senal |
struct | Senal is one señal, as it is sent. |
Store |
interface | Store is what the sender reads and keeps (*store.Store). |
Enviador |
struct | Enviador sends the señales of this installation. |
Rango |
func | Rango is how many people use an installation, as a range. |
(*Enviador) Proxima |
method | Proxima is the señal that would go now: what the operators see. |
(*Enviador) Encendidas |
method | Encendidas says whether señales go, and if not, why. |
(*Enviador) Enviar |
method | Enviar sends the señal now and records when. |
(*Enviador) Run |
method | Run sends a señal when one is due, until ctx ends: the first a few minutes after the installation starts, then once every Cada, a few hours either way so they don't all come at once. |
internal/senales/comentarios_test.go¶
244 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestComentario |
func | A comment goes with only its text, language and the installation's four data, and the hash of a token that stays; the answer is asked for with the token, and 429 says to wait. |
TestRecogidaToca |
func | A comment is asked about the first time always, then every 30 minutes; once it has waited a day, every 3 hours. |
TestRecogerRespuestasPronto |
func | The first ask comes soon after start (not after hours), the next ones every Cada; a failure is retried next time, and an answer is kept. |
TestRecogerAtrasado |
func | With the clock: a comment that waited a day is asked about every 3 hours, not every 30 minutes. |
TestRecogerAlVer |
func | Opening the page asks at once, at most once a minute; without comments that wait, it neither asks nor uses up the minute. |
internal/senales/senales_test.go¶
91 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestSenal |
func | A señal carries exactly the counts, the identity and where it runs, and nothing that names anything; sending it records when; off, nothing goes. |
TestRango |
func |
internal/spec¶
Package spec defines rendimiento.yaml, the only file an app repo needs.
internal/spec/cobertura.go¶
138 lines
| Name | Kind | Summary |
|---|---|---|
(Spec) TestedPaths |
method | TestedPaths are the repository paths a run of a branch or pull request builds or tests: each built service's, build's and job's folder (and its watch paths and Dockerfile), and each build-stage task that runs on branches (when: always) with its watch paths. |
cleanPath |
func | cleanPath is a repository path without leading or trailing slashes, "." for the root. |
inert |
func | inert says whether a changed file is one no build reads: documentation, licences and the settings of git, editors and Renovate. |
(Spec) Untested |
method | Untested lists what of the changed files no step of a branch's run builds or tests, as the shortest folders that hold no tested path ("mobile/"), or the file itself when every folder above it holds one. |
coveredBy |
func | coveredBy says whether f is one of the tested paths or under one. |
group |
func | group is how an untested file is named: its shortest folder that holds no tested path, with a trailing slash, or the file itself. |
internal/spec/enseco.go¶
328 lines
| Name | Kind | Summary |
|---|---|---|
(*Spec) validateDryOn |
method | validateDryOn checks a dryRunOn (p is where it is written). |
onPublished |
func | onPublished says whether a dry check runs against the published release on a branch that changes only the checks. |
onCopy |
func | onCopy says whether a dry check runs against a copy of the branch: when it asks for one, or, without dryRunOn, when the branch changes the app. |
(Spec) DryChecks |
method | DryChecks are the checks that run en seco: the post-deploy tasks with dryRun (never one with service:) and the app's tests with dryRun, in order. |
DryPlan |
struct | DryPlan is what a branch's run does en seco. |
(DryPlan) Runs |
method | Runs says whether the plan runs anything against the published release. |
(DryPlan) RunsOnCopy |
method | RunsOnCopy says whether the plan runs anything against a copy of the branch. |
(DryPlan) Touched |
method | Touched says whether the branch touches the app or its checks at all: one that changes only the book runs nothing en seco. |
(Spec) DryRunPlan |
method | DryRunPlan decides what a branch (this spec, with files changed against the default branch) runs en seco, given published, the spec of the release that is live. |
onlyAmong |
func | onlyAmong keeps in each check's after: only the checks given, which are the ones that run. |
(Spec) DryChecksAmong |
method | DryChecksAmong are this spec's dry checks named in among (a copy's spec gives the checks their copy's addresses), with after: kept to them. |
(Spec) checkBuilds |
method | checkBuilds are the builds whose image only checks run: named by a post-deploy task's image (build: |
(Spec) withoutChecks |
method | withoutChecks is the spec without its checks: no post-deploy tasks, no tests, and none of the given builds. |
touches |
func | touches says whether a changed file is under dir, one of the watch paths, or the Dockerfile. |
sameJSON |
func | sameJSON says whether two values are written the same. |
internal/spec/previas.go¶
231 lines
| Name | Kind | Summary |
|---|---|---|
Previews |
struct | Previews asks for a live copy of the app for each of its pull requests, at pr- |
(*Previews) KeepDays |
method | KeepDays is how many days a copy lives without a push. |
(*Previews) Copies |
method | Copies is how many copies the app keeps at once. |
(*Previews) validate |
method | |
PreviewHost |
func | PreviewHost is a host of the copy for pull request number (a route's path, after the host, is kept). |
ShortCopyHost |
func | ShortCopyHost is a host of the short copy run's checks use en seco, as PreviewHost with seco- |
copyHost |
func | copyHost puts a copy's label (pr-7, seco-1802) in a host. |
PreviewOf |
func | PreviewOf is the spec of the copy for pull request number: every service once, at pr- |
ShortCopyOf |
func | ShortCopyOf is the spec of the short copy a branch's run makes only to run its checks en seco when the branch has no pull request: the same as a pull request's (PreviewOf), at seco- |
copyOf |
func | |
copyURL |
func | copyURL is url at the copy's host for its host ("" when it is not one of the app's). |
quarter |
func | quarter asks for a quarter of a service's requests, keeping its limits. |
internal/spec/pruebas.go¶
176 lines
| Name | Kind | Summary |
|---|---|---|
Tests |
struct | Tests are the app's own browser tests, run against each release once it is live (decision 136, step 13, phase 2). |
(*Tests) BlockAfter |
method | BlockAfter is how many clean releases make a test blocking. |
(*Tests) Task |
method | Task is the post-deploy task that runs the tests: in the build's image, with one retry (a test that passes on it is flaky), Playwright's list and JSON reporters, and a line per test at the end. |
(*Tests) Requests |
method | Requests resolves the tests' requests and limits ("" = unset). |
(*Tests) url |
method | url is BASE_URL: the one given, or the first service's domain. |
(*Tests) validate |
method | |
shellQuote |
func | shellQuote quotes s for sh -c. |
internal/spec/spec.go¶
1595 lines
| Name | Kind | Summary |
|---|---|---|
Spec |
struct | Spec is a parsed rendimiento.yaml. |
Fix |
struct | Fix is one declared fix: a known recipe (npm, go, …) that brings its own command, image and files, or a command of the app's own, in an image, with the files it may write. |
(*Spec) FixNamed |
method | FixNamed is the app's fix of that name. |
(*Spec) Observed |
method | Observed reports whether svc sends traces: its own observe, else the app's. |
Verify |
struct | Verify configures release verification: after a release is live, its services are checked for a while, and a release that breaks a service that worked before is rolled back to the last good release. |
(*Verify) AutoRollback |
method | AutoRollback reports whether a release that fails verification is rolled back. |
Task |
struct | Task is a command run as a step of every CI run: the commit is checked out, and the command runs in Image from Path. |
(Task) PostDeploy |
method | PostDeploy reports whether the task runs after the release is live. |
(Task) PreDeploy |
method | PreDeploy reports whether the task runs before the release is rolled out. |
(Task) Deploys |
method | Deploys reports whether the task runs around a deploy (pre or post), in the app's namespace, rather than as a CI step. |
(Task) SecretNames |
method | SecretNames lists every secret the task reads. |
(Spec) SecretNames |
method | SecretNames lists every secret the app's services, jobs and tasks read: the ones that can be set from the app's settings. |
PostgresOptions |
struct | PostgresOptions configure the app's database (one per app, shared by every service that needs it). |
RedisOptions |
struct | RedisOptions configure the app's cache (one per app, shared by every service that needs it). |
Need |
struct | Need is something a service depends on: rendimiento provides it and injects how to reach it. |
(*Need) UnmarshalJSON |
method | UnmarshalJSON accepts a word ("postgres") or an object ({service: ns/name, env: VAR}). |
(Need) MarshalJSON |
method | MarshalJSON writes the short form when it can, so generated files stay readable. |
(Need) EnvName |
method | EnvName is the variable a need's address is injected into. |
(Spec) Runs |
method | Runs reports whether anything of the app runs where it is deployed (a service or a job). |
(*Spec) Needs |
method | Needs reports whether any service of the app needs kind. |
Job |
struct | Job is a scheduled task. |
Touches |
func | Touches reports whether a change to repo file f affects something built from dir or any of the watch paths ("." means the whole repo). |
(Job) ImageKey |
method | ImageKey is the key of a built job's image in a release's image map. |
ImageBuild |
struct | ImageBuild is an image built from a folder of the repo on every run, like a service's, but not deployed: its digest is kept in the release. |
(ImageBuild) ImageKey |
method | ImageKey is the key of the image in a release's image map. |
Service |
struct | Service is one deployable part of an app: built from a folder of the repo (or a ready-made image) and run as a Deployment with a Service. |
LANOptions |
struct | LANOptions expose a service on the local network. |
Catalog |
struct | Catalog is what the Services page shows about a service besides what it can work out itself (addresses, ports, origin, who uses it). |
ResourceOverride |
struct | ResourceOverride replaces individual values of the size preset. |
IngressOptions |
struct | IngressOptions fine-tune the ingress of a service with a domain. |
ResourcesFor |
func | ResourcesFor resolves the service's requests and limits ("" = unset). |
override |
func | override applies a service's own resources over its size's: an empty field keeps the size's value, "none" removes it (no limit). |
Route |
struct | Route is one host + path prefix a service answers on. |
ParseRoute |
func | ParseRoute splits "host/path" (path defaults to "/"). |
(Service) AllRoutes |
method | AllRoutes is everything the service's ingress routes to it: "/" on its domain and aliases, then its extra routes. |
(Service) HasIngress |
method | HasIngress reports whether the service is reachable from outside. |
(Service) IngressName |
method | IngressName is the name of the service's ingress. |
(Service) TLSGroups |
method | TLSGroups returns the service's hosts grouped by certificate secret, in host order: [{secret, hosts}]. |
ConfigFile |
struct | ConfigFile mounts an existing ConfigMap as read-only files. |
SecretFile |
struct | SecretFile mounts an existing Secret as read-only files. |
(Service) SecretNames |
method | SecretNames lists every secret the service reads, however it reads it. |
secretNames |
func | secretNames is the sorted, de-duplicated set of secrets named whole, in NAME: secret/key references, or as mounted files. |
(Service) TLSSecretName |
method | TLSSecretName is the certificate secret for the service's domain. |
Build |
struct | Build says how a service's image is built. |
(Build) validate |
method | validate checks a build section: a known builder, start only for Railpack, and well-formed build arguments. |
Test |
struct | Test is a command run in a container image before the build; a failure stops the build. |
(Test) Requests |
method | Requests resolves the test's requests and limits ("" = unset). |
(Test) validate |
method | validate checks a test section: an image and a command, a known size, valid resources and a timeout that is not negative. |
Health |
struct | Health is the readiness and liveness check of a service. |
Volume |
struct | Volume gives a service persistent storage (a Longhorn volume by default). |
(Service) VolumeFSGroup |
method | VolumeFSGroup is the pod fsGroup for the service's volume, or nil. |
(Service) Hosts |
method | Hosts are every hostname the service answers on: domain, then aliases. |
(Service) ClaimName |
method | ClaimName is the PersistentVolumeClaim the service mounts. |
Size |
type | Size is a preset of CPU and memory requests and limits, sized for Raspberry Pi nodes. |
Resources |
struct | Resources are requests/limits for a size, sized for Raspberry Pi nodes. |
(Size) Resources |
method | Resources returns the size's requests and limits. |
Parse |
func | Parse reads rendimiento.yaml, applies defaults and validates it. |
(*Spec) Marshal |
method | Marshal writes the spec as YAML. |
(*Spec) Default |
method | Default fills in defaults (path, port, size, replicas, Dockerfile) in place. |
(*Spec) Validate |
method | Validate reports every problem in the spec at once, each with its path (services[1].port …). |
(*Spec) validateBuilds |
method | validateBuilds checks the builds: entries (images built and tested but not run as services): unique names, not taken by a service or job, and valid build and test sections. |
(*Spec) validateTasks |
method | validateTasks checks the tasks: unique names, their stage, and that each name in after: is a task or something built in this run. |
(*Spec) validateFixes |
method | validateFixes checks the fixes: unique names (among everything that has one), a relative path, and either a known recipe or an image, a command and the files it may write. |
(*Spec) validateNeeds |
method | validateNeeds checks what services need (a database, a cache, another service): known kinds, existing services, and no two needs writing the same environment variable. |
validateResources |
func | validateResources checks resource overrides are quantities Kubernetes understands ("none" only for limits). |
validateFit |
func | validateFit checks that what is asked for fits under the limit, after the size's values and the overrides are put together: Kubernetes refuses a pod whose request is over its limit, so a CPU of 2 on a medium task (whose limit is 1) failed only when the run made its pod. |
quantityValue |
func | quantityValue reads a quantity as a number (cores, or bytes), to compare two of the same kind. |
resourceQuantity |
func | resourceQuantity checks one quantity, like 500m or 2Gi. |
(*Spec) validateRoutes |
method | validateRoutes checks routes (a path of a domain sent to a service): the host must be a domain or alias of a service in this app (so its certificate covers it), a route needs a path, and no host and path goes to two services. |
(*Spec) validateJobs |
method | validateJobs checks the jobs (scheduled commands): names that are DNS labels, unique among jobs and services, a cron schedule, exactly one of service, path or image to run, a known size, and valid environment. |
internal/spec/cobertura_test.go¶
52 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestUntested |
func |
internal/spec/enseco_test.go¶
198 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestDryChecks |
func | |
TestDryRunPlan |
func | |
TestDryRunRules |
func | |
TestDryRunTargets |
func | What each check runs against: the published release when only the checks changed, a copy of the branch when the app changed, as dryRunOn asks otherwise; a branch that touches neither runs nothing. |
TestDryRunOnRules |
func |
internal/spec/previas_test.go¶
95 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPreviewsValidate |
func | |
TestPreviewOf |
func | The copy of a pull request answers at pr- |
TestPreviewHost |
func |
internal/spec/pruebas_test.go¶
63 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestTestsValidate |
func | |
TestTestsResources |
func | Without a size the tests get a browser's resources, like a build's test: section; a size and resources change them as for a task. |
internal/spec/spec_test.go¶
528 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestParseDefaults |
func | |
TestParseFull |
func | |
TestValidateErrors |
func | |
TestSecplusShape |
func | secplus as it runs today: env from one key, the whole secret as files, streaming. |
TestExistingClaim |
func | |
TestPodoiShape |
func | podoi as it runs today: a built website on two hosts, and Postgres from a ready-made image on its existing volume. |
TestJobs |
func | |
TestStockpulseShape |
func | stockpulse as it runs today. |
TestTouches |
func | |
TestRoutes |
func | wellness: /api on the website's hosts goes to the API. |
TestValidateBuildGPUCatalog |
func | |
TestNeeds |
func | |
TestTasks |
func | |
TestPostDeployTasks |
func | |
TestBuilds |
func | |
TestTasksOnly |
func | A library has no service: a task alone is a valid rendimiento.yaml. |
TestFixes |
func | Fixes: their path defaults to the root, their names are unique among themselves too, and their timeout and patterns are checked. |
internal/spec/ejemplos¶
Package ejemplos holds rendimiento.yaml examples that every layer must accept: the spec's validation, the App object's schema in Kubernetes, render, and the local destination.
internal/spec/ejemplos/ejemplos.go¶
80 lines
| Name | Kind | Summary |
|---|---|---|
Ejemplo |
struct | Ejemplo is one example, by its file name (without .yaml). |
Todos |
func | Todos parses every example, defaulted, in name order. |
Malo |
struct | Malo is an example every layer must refuse: its first line says the error, as "# error: |
Malos |
func | Malos are the examples that must be refused, in name order. |
internal/spec/ejemplos/ejemplos_test.go¶
62 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestValidos |
func | Every example, and the complete example in the book, is valid. |
TestMalos |
func | Every bad example is refused, with the error its first line says. |
internal/store¶
Package store persists apps, CI runs, step logs, releases and sessions in Postgres.
internal/store/acceso.go¶
211 lines
| Name | Kind | Summary |
|---|---|---|
AppAccess |
struct | AppAccess is what one person may do on the apps of one organization. |
(AppAccess) Role |
method | Role is the person's role on an app: the organization's administrators are always administrators; on an app without a list, the organization's role, as before lists existed; on an app with a list, the role the list gives them, or none (the app does not exist for them). |
(AppAccess) RoleOn |
method | RoleOn is Role for an app of the organization known by its name (from a list already narrowed to the organization). |
(AppAccess) Sees |
method | Sees says whether something about the app named (of the organization) may be shown: always for "" (about no app). |
(AppAccess) Hidden |
method | Hidden are the organization's apps the person may not see. |
(AppAccess) Narrowed |
method | Narrowed is the access with every role capped at most (a demo link's guest never does more than read). |
(*Store) AppAccessOf |
method | AppAccessOf reads what login may do on the organization's apps, given their role in it (as the caller judged it: "" when not a member). |
AppList |
struct | AppList is who enters an app: whether it has a list, and the people on it with their role for the app. |
(*Store) AppMembers |
method | AppMembers is an app's list (people taken out of the organization are left out: they no longer count). |
(*Store) SetAppList |
method | SetAppList turns an app's list on (only the organization's administrators enter until people are added) or off (everyone of the organization enters with their role, and the list is forgotten). |
(*Store) SetAppMember |
method | SetAppMember gives a person of the organization a role on the app, and turns the app's list on if it was off. |
(*Store) RemoveAppMember |
method | RemoveAppMember takes a person off the app's list: they no longer see it (unless they become an administrator of the organization). |
forgetAppMembers |
func | forgetAppMembers drops a person from the lists of an organization's apps (they left it): coming back, they start with no app with a list. |
internal/store/actividad.go¶
116 lines
| Name | Kind | Summary |
|---|---|---|
Activity |
struct | Activity is one thing that just happened in an organization, for the notices people see wherever they are in the UI: a run started or ended, a release went live or was rolled back, an encargo moved. |
(*Store) ActivityCursor |
method | ActivityCursor is where a stream of activity starts: the database's time now and the last encargo event so far. |
(*Store) ActivitySince |
method | ActivitySince is what happened in an organization after the cursor, and the cursor to ask from next time. |
internal/store/actualizar.go¶
48 lines
| Name | Kind | Summary |
|---|---|---|
ActualizarSolo |
struct | ActualizarSolo is whether rendimiento installs fix releases by itself on a computer (decision 138: off until an administrator turns it on). |
(*Store) GetActualizarSolo |
method | GetActualizarSolo reads the switch (off when never set). |
(*Store) SetActualizarSolo |
method | SetActualizarSolo turns the switch on or off. |
internal/store/addons.go¶
175 lines
| Name | Kind | Summary |
|---|---|---|
Addon |
struct | Addon is an optional platform feature and its settings (JSON, per add-on). |
(*Store) GetAddon |
method | GetAddon returns the add-on's row, or ErrNotFound if it was never set up. |
(*Store) PutAddon |
method | PutAddon creates or replaces an add-on's switch and settings. |
(*Store) ClaimSchedule |
method | ClaimSchedule records a scheduled start at at unless another worker already did (last_scheduled moved on). |
(*Store) AppAddons |
method | AppAddons returns the app's per-add-on switches. |
(*Store) SetAppAddon |
method | SetAppAddon switches an add-on on or off for one app. |
(*Store) AppsWithAddon |
method | AppsWithAddon lists apps that have the add-on switched on. |
AddonRun |
struct | AddonRun is one execution of an add-on (e.g. |
(*Store) CreateAddonRun |
method | CreateAddonRun records a run as started and fills in its ID. |
(*Store) FinishAddonRun |
method | FinishAddonRun records a run's outcome, per-repository results and log. |
(*Store) FailRunningAddonRuns |
method | FailRunningAddonRuns closes runs a previous process left behind. |
scanAddonRun |
func | scanAddonRun reads an add-on run row (with its log when withLog). |
(*Store) ListAddonRuns |
method | ListAddonRuns returns the most recent runs, newest first, without their logs. |
(*Store) GetAddonRun |
method | GetAddonRun returns one run with its log. |
prefixed |
func | prefixed qualifies a column list with a table alias ("a.id, a.name"). |
internal/store/agente_ve.go¶
47 lines
| Name | Kind | Summary |
|---|---|---|
SlowRequest |
struct | SlowRequest is one slow request the platform's log (the Registro) noted: its route (a pattern, never a path), how long it took and its answer. |
(*Store) SlowRequests |
method | SlowRequests are an app's slow requests in the Registro since a time, the newest first: its own lines, and with platform the platform's own (they carry no app: the app is rendimiento itself, SELF_APP). |
(*Store) HallazgosDeApp |
method | HallazgosDeApp are the lookout's findings about one app, the newest first. |
internal/store/ai.go¶
222 lines
| Name | Kind | Summary |
|---|---|---|
AISettings |
struct | AISettings is an organization's choice of AI provider and its caps. |
AIUsage |
struct | AIUsage is one measured call to a model. |
(*Store) AISettingsOf |
method | AISettingsOf is an organization's AI settings (the defaults when it has none yet: the local model, a $1 cap, no allowance). |
(*Store) SaveAISettings |
method | SaveAISettings stores an organization's choices (not the allowance, which is the operator's: see SetAIAllowance). |
(*Store) SetAIAllowance |
method | SetAIAllowance is what the operator lets an organization spend of the platform's key each month. |
(*Store) RecordAIUsage |
method | RecordAIUsage keeps one call. |
monthStart |
func | monthStart is the first instant of now's month (UTC): caps are monthly. |
(*Store) AISpent |
method | AISpent is what an organization spent this month, by who paid: its own key, or the platform's. |
(*Store) AIPlatformSpent |
method | AIPlatformSpent is what every organization spent of the platform's key this month: the operator's bill. |
(*Store) AIUsageOf |
method | AIUsageOf lists an organization's latest calls. |
(*Store) SetEscalation |
method | SetEscalation is who answers an organization's new failures ("", own or platform), and how many times a month at most. |
(*Store) AICalls |
method | AICalls counts an organization's calls from a source this month (the diagnostician's escalations, against their monthly limit). |
(*Store) SetEncargoAuto |
method | SetEncargoAuto is the most an encargo may be estimated to cost for the platform's AI to take it. |
CodeAgentMode |
func | CodeAgentMode says whether mode is one of the coding agent's. |
(*Store) SetCodeAgent |
method | SetCodeAgent is what the platform's coding agent does for an organization. |
(*Store) SetEstimateLearn |
method | SetEstimateLearn turns the estimator's learning on (it corrects its table by what the coding agent spent) or off (the fixed table). |
(*Store) SetAutoEncargo |
method | SetAutoEncargo is when an encargo opens by itself for a failed run. |
internal/store/ajustes.go¶
62 lines
| Name | Kind | Summary |
|---|---|---|
Ajuste |
struct | Ajuste is a platform setting saved on the Environment page, by its environment variable. |
(*Store) GetAjustes |
method | GetAjustes are the settings saved on the Environment page. |
(*Store) SaveAjuste |
method | SaveAjuste keeps a setting's value; it wins over the environment's. |
(*Store) DeleteAjuste |
method | DeleteAjuste forgets a saved setting: the environment's value holds again. |
internal/store/aprobaciones.go¶
143 lines
| Name | Kind | Summary |
|---|---|---|
Aprobacion |
struct | Aprobacion is a change to production an agent asked for, and what a person decided. |
scanAprobacion |
func | |
(*Store) CrearAprobacion |
method | CrearAprobacion records a request, waiting until a.Vence. |
(*Store) GetAprobacion |
method | GetAprobacion is one request, of any organization (callers check). |
(*Store) ListarAprobaciones |
method | ListarAprobaciones is an organization's requests, newest first: only those still waiting, or the last 50. |
(*Store) DecidirAprobacion |
method | DecidirAprobacion approves or rejects a waiting request of the organization: ErrNotFound when it is not the organization's, and ErrNoPendiente when it was decided already or expired. |
(*Store) TerminarAprobacion |
method | TerminarAprobacion records how an approved request went: done, with what came of it, or failed, with why. |
(*Store) GuardarTraduccion |
method | GuardarTraduccion keeps a request's reason in another language. |
internal/store/arreglos.go¶
143 lines
| Name | Kind | Summary |
|---|---|---|
FixRun |
struct | FixRun is one run of an app's declared fix. |
(*Store) StartFixRun |
method | StartFixRun records a fix run as it starts. |
(*Store) FinishFixRun |
method | FinishFixRun records how a fix run ended, with its log. |
(*Store) SetFixRunCommit |
method | SetFixRunCommit records the commit a fix run's files became. |
scanFixRun |
func | |
(*Store) FixRunByID |
method | FixRunByID is one fix run of an app. |
(*Store) FixRunLog |
method | FixRunLog is a fix run's whole log. |
(*Store) FixRuns |
method | FixRuns are an app's latest fix runs, newest first; with runID, only those that answered that run. |
(*Store) MadeByFix |
method | MadeByFix reports whether a commit of the app is one a fix run made: a fix is never run by itself on its own commit, so it cannot loop. |
(*Store) NoteEncargoFix |
method | NoteEncargoFix adds a fix the coding agent ran to its encargo's history. |
internal/store/bitacora.go¶
205 lines
| Name | Kind | Summary |
|---|---|---|
Bitacora |
struct | Bitacora is one action in the log: who did what, on what, through where, and how it ended. |
(Bitacora) huella |
method | huella is the row's hash: sha256 over the previous hash and the row's fields as canonical JSON (Go sorts map keys). |
(*Store) AnotarBitacora |
method | AnotarBitacora adds an action to its organization's chain: it takes the organization's lock, reads the last hash, and writes the row with its own. |
nonNil |
func | |
nonNilAny |
func | |
FiltroBitacora |
struct | FiltroBitacora narrows a listing: by who, by action (a substring), by app (sobre.app), and before an id (to page back). |
(*Store) ListarBitacora |
method | ListarBitacora is an organization's actions, newest first. |
scanBitacora |
func | |
VerificacionBitacora |
struct | VerificacionBitacora is the result of checking a chain: how many rows were checked, and the first that does not hold (0 when all do), with why. |
(*Store) VerificarBitacora |
method | VerificarBitacora walks an organization's chain from its first row and recomputes every hash: a row changed in the database no longer matches its hash, and a row removed leaves the next one pointing at a hash that is not the one before it. |
internal/store/bitbucket.go¶
80 lines
| Name | Kind | Summary |
|---|---|---|
BitbucketConnection |
struct | BitbucketConnection is one Bitbucket Cloud workspace rendimiento works with (migration 0061). |
scanBitbucket |
func | |
(*Store) AddBitbucketConnection |
method | AddBitbucketConnection keeps a new workspace, or the same workspace again with a new consumer (it is reconnected, keeping its id). |
(*Store) BitbucketConnection |
method | BitbucketConnection is one connection, or ErrNotFound. |
(*Store) BitbucketConnections |
method | BitbucketConnections lists every connection, the oldest first. |
(*Store) SetBitbucketUsername |
method | SetBitbucketUsername records who rendimiento acts as on the connection, once a person authorized it. |
(*Store) DeleteBitbucketConnection |
method | DeleteBitbucketConnection forgets a connection; its apps, if any, stay and cannot build until it is connected again. |
internal/store/caminos.go¶
40 lines
| Name | Kind | Summary |
|---|---|---|
HistoryRun |
struct | HistoryRun is a run as the Caminos tab draws it: the run, the steps that failed, and the release it made (0 if none). |
(*Store) RunHistory |
method | RunHistory lists an app's runs created since a time, oldest first (at most 2,000), each with its failed steps and the release it made. |
internal/store/capacidad.go¶
65 lines
| Name | Kind | Summary |
|---|---|---|
Capacity |
struct | Capacity is how much the platform runs at once, set on the Environment page. |
(*Store) GetCapacity |
method | GetCapacity is the capacity set on the Environment page (zero values when nothing was set). |
(*Store) SaveCapacity |
method | SaveCapacity keeps the capacity set on the Environment page. |
internal/store/cola.go¶
224 lines
| Name | Kind | Summary |
|---|---|---|
CoderCandidate |
struct | CoderCandidate is an encargo the coding agent could take now, with how many its organization lets it do at once. |
(*Store) CoderCandidates |
method | CoderCandidates are the coding agent's queues of every organization, each in its order (the scheduler, agentes.Pick, chooses from them), up to limit. |
(*Store) CoderQueue |
method | CoderQueue is an organization's queue: the pending encargos the coding agent will do, in the order it takes them. |
(*Store) ReorderQueue |
method | ReorderQueue puts an organization's pending encargos in the order of ids (the first is done first); the ones it leaves out go after them. |
(*Store) SetEncargoApp |
method | SetEncargoApp says which app a pending encargo nobody has is about (it was asked without one): the estimator rates it again, knowing the app, unless a person chose who does it. |
(*Store) SetEncargoDoing |
method | SetEncargoDoing keeps what the coding agent does now on an encargo it has ("tool:what"), for its queue's page. |
(*Store) StopEncargo |
method | StopEncargo is a person asking the platform's coding agent to stop the encargo it does: it gives it back to them, with what it did. |
(*Store) ShouldStop |
method | ShouldStop says whether the coding agent should stop an encargo: a person asked it to, or it is no longer the agent's to do (dropped). |
(*Store) CoderOf |
method | CoderOf lists an organization's encargos a platform agent (by its name) has now (taken or waiting), the first taken first. |
(*Store) CoderFinished |
method | CoderFinished lists an organization's encargos a platform agent (by its name) finished and are not closed yet: delivered (waiting for the person's review), and given back to the person (pending, for their own agent), the most recent first. |
(*Store) SetCodeConcurrency |
method | SetCodeConcurrency is how many encargos the coding agent may do at once for an organization (1 to MaxCodeConcurrency; never two of one app). |
(*Store) AISpentSince |
method | AISpentSince is what an organization's calls from a source cost since a moment (the coding agent's today, on its queue's page). |
UnconfirmedManual |
struct | UnconfirmedManual is a known failure the diagnostician wrote with a stronger model that nobody rated yet, with the run to rate it on. |
(*Store) UnconfirmedManuals |
method | UnconfirmedManuals lists an organization's known failures tagged tag (agentes.Unconfirmed) whose diagnosis nobody rated, the newest first. |
RutaCounts |
struct | RutaCounts is what the Ruta's front page counts: encargos agents have now, open to-dos, what was done today (encargos delivered and to-dos ticked), and stories people told in the last week. |
(*Store) CountRuta |
method | CountRuta counts an organization's RutaCounts; today starts at since. |
internal/store/comentarios.go¶
166 lines
| Name | Kind | Summary |
|---|---|---|
Comentario |
struct | Comentario is what a person says about an agent's work (a handed-over cargo, an encargo) without sending it back, or an agent's answer to it. |
scanComentario |
func | scanComentario reads a comment; New is for login, its reader. |
(*Store) comentarios |
method | |
(*Store) Comentario |
method | Comentario returns one comment. |
(*Store) ComentarCargo |
method | ComentarCargo is a person's comment on an agent's cargo of the organization (ErrNotFound when it has no such cargo). |
(*Store) ComentarEncargo |
method | ComentarEncargo is a person's comment on an encargo of the organization, in any state: it does not send it back (ErrNotFound when there is none). |
(*Store) ResponderComentario |
method | ResponderComentario is an agent's answer to a person's comment of the organization: it goes in the same thread, and the comment is answered. |
(*Store) ListComentarios |
method | ListComentarios is the thread of a cargo (cargoID) or an encargo (encargoID), oldest first; with neither, the organization's latest comments (up to limit), still oldest first. |
(*Store) ComentariosSinResponder |
method | ComentariosSinResponder are people's comments no agent has answered, oldest first. |
(*Store) RespuestasSinVer |
method | RespuestasSinVer are agents' answers to login's comments that login has not seen yet, oldest first: the bell shows them. |
(*Store) VerRespuestas |
method | VerRespuestas notes that login saw these answers to their comments. |
internal/store/cuentas.go¶
386 lines
| Name | Kind | Summary |
|---|---|---|
KnownCause |
func | KnownCause is cause when it is one of Causes, else "". |
ClassifyCause |
func | ClassifyCause guesses a release's cause from its note, for the ones from before the cause was recorded (or whose model gave none): approximate, by the words in it; CauseOther when none matches. |
CuentaCausa |
struct | CuentaCausa is one cause of the coding agent's releases: how many, and of which encargos (each once, the oldest first); Approx is how many of them were classified from their note (ClassifyCause), not recorded. |
CuentaRazon |
struct | CuentaRazon is the middle (median) of what the coding agent spent over what was estimated, on the encargos it finished of a difficulty band (From to To; 0 and 0 for all of them). |
CuentaRacha |
struct | CuentaRacha is the coding agent giving encargos back for the same cause N times in a row, its latest outcomes (a delivery ends it; a person's stop and a restart are not its own and neither make nor end it). |
CoderCuentas |
struct | CoderCuentas is how an organization's coding agent is doing, over the encargos it took since a moment (all of them, when it is zero): - Encargos it took; Finished it delivered (FirstTry without giving it back first, AfterRetry after), GaveBack it gave back to the person's own agent and did not finish, Working it has now; - of the ones it finished, Accepted the person accepted at its first delivery, Returned sent back with a comment, ToReview not answered yet; - Causes, why it gave back the GaveBack (each one's last release), and Retried, the releases of encargos it took again afterwards; - Ratios, spent over estimate on what it finished: by difficulty band, and All; - Racha, a warning when its latest outcomes are RachaFrom or more releases for the same cause (over all its record, not the period). |
cuentaEvento |
struct | |
cuentaEncargo |
struct | |
(*Store) CoderCuentasOf |
method | CoderCuentasOf counts how an organization's coding agent (who: its name, agentes.CoderName, as CoderRecord tells it) is doing over the encargos it took since since (zero: all of them). |
cuentasFrom |
func | cuentasFrom counts CoderCuentas from the encargos' logs (each in order). |
rachaOf |
func | rachaOf is the releases for one cause at the end of the outcomes, when they are RachaFrom or more. |
sortCausas |
func | sortCausas lists the causes, the most first (ties in Causes' order). |
mediana |
func | mediana is the middle of xs (0 when there are none), to two decimals. |
internal/store/demo.go¶
151 lines
| Name | Kind | Summary |
|---|---|---|
DemoLogin |
func | DemoLogin is the guest a demo link signs in as. |
IsDemoLogin |
func | IsDemoLogin reports a demo link's guest. |
DemoLink |
struct | DemoLink is a secret address that opens a read-only session in an organization (only the code's hash is kept). |
scanDemo |
func | |
(*Store) CreateDemoLink |
method | CreateDemoLink keeps a new demo link and adds its guest to the organization. |
(*Store) DemoLinks |
method | DemoLinks lists an organization's demo links, newest first, after removing those that expired. |
(*Store) OpenDemoLink |
method | OpenDemoLink finds the live demo link with this code's hash and counts the visit, or ErrNotFound (unknown, expired, or its guest was removed). |
(*Store) DeleteDemoLink |
method | DeleteDemoLink turns a demo link off: the link, its guest and the guest's sessions go at once. |
(*Store) purgeDemoLinks |
method | purgeDemoLinks removes the demo links that expired, with their guests. |
dropDemoGuests |
func |
internal/store/diagnoses.go¶
137 lines
| Name | Kind | Summary |
|---|---|---|
Diagnosis |
struct | Diagnosis is the diagnostician agent's answer for a failed run. |
(*Store) GetDiagnosis |
method | GetDiagnosis is a run's diagnosis (ErrNotFound when there is none). |
(*Store) AskDiagnosis |
method | AskDiagnosis asks for a run's diagnosis (again): it is pending until the agent answers. |
(*Store) SaveDiagnosis |
method | SaveDiagnosis keeps the agent's answer. |
(*Store) SaveTranslation |
method | SaveTranslation keeps a diagnosis in another language, unless the diagnosis was written again since (its text is no longer original). |
(*Store) RunsToDiagnose |
method | RunsToDiagnose are the runs the agent should look at, oldest first: diagnoses asked for, and runs that failed since since in organizations with automatic diagnosis on, not diagnosed yet. |
(*Store) SetAutoDiagnose |
method | SetAutoDiagnose turns an organization's automatic diagnosis of failed runs on or off. |
(*Store) LastGoodSHA |
method | LastGoodSHA is the commit of an app's last successful run on a branch before a run (ErrNotFound when there is none): what changed since then likely broke it. |
(*Store) SetDiagnosisFeedback |
method | SetDiagnosisFeedback keeps what a person said of a diagnosis, and the known failure it became in the Ruta. |
(*Store) LinkDiagnosisRuta |
method | LinkDiagnosisRuta ties a diagnosis to the known failure it became. |
internal/store/dormir.go¶
193 lines
| Name | Kind | Summary |
|---|---|---|
Sueno |
struct | Sueno is where rendimiento's sleep stands: one row, so a restart stays asleep (platform.Sueno keeps it). |
Despertar |
struct | Despertar is what a wake did, for the summary people see after it. |
(*Store) GetSueno |
method | GetSueno reads where rendimiento's sleep stands. |
(*Store) GuardarSueno |
method | GuardarSueno keeps where rendimiento's sleep stands. |
AvisoGuardado |
struct | AvisoGuardado is a forja's webhook received while rendimiento slept: the event it carried, already checked (its signature), kept to be handled on waking. |
(*Store) GuardarAviso |
method | GuardarAviso keeps a webhook's event to handle it on waking. |
(*Store) AvisosGuardados |
method | AvisosGuardados are the webhooks kept while asleep, in the order they came. |
(*Store) ContarAvisos |
method | ContarAvisos is how many webhooks wait for the wake. |
(*Store) BorrarAviso |
method | BorrarAviso forgets a webhook once handled. |
(*Store) EmpezarPeriodo |
method | EmpezarPeriodo notes that rendimiento fell asleep at desde. |
(*Store) TerminarPeriodo |
method | TerminarPeriodo notes that it woke at hasta. |
Periodo |
struct | Periodo is a span rendimiento slept (Hasta nil: it sleeps still). |
(*Store) PeriodosDormidos |
method | PeriodosDormidos are the spans it slept that touch desde..hasta. |
(*Store) RepetirAlDespertar |
method | RepetirAlDespertar puts a run that sleep cut back in the queue, from its first step: it is not failed nor cancelled, and runs again on waking. |
internal/store/encargos.go¶
438 lines
| Name | Kind | Summary |
|---|---|---|
Encargo |
struct | Encargo is work asked of agents. |
EncargoLog |
struct | EncargoLog is one thing that happened to an encargo. |
encargoFields |
func | encargoFields are where encargoCols are scanned to, in their order; a query that selects more after them appends its own. |
scanEncargo |
func | |
(*Store) CreateEncargo |
method | CreateEncargo adds an encargo, pending. |
logEncargo |
func | |
logEncargoCause |
func | logEncargoCause logs with the cause of a release (Cause*; "" keeps it NULL, to be classified by its note when read). |
(*Store) Encargo |
method | Encargo returns one encargo with its history. |
(*Store) ListEncargos |
method | ListEncargos lists an organization's encargos, the most recently changed first: the open ones (not reviewed or cancelled), or all. |
(*Store) change |
method | change applies one state change in a transaction: the update must touch the row (else ErrEncargoState), and it is logged. |
(*Store) changeCause |
method | changeCause is change, logging a release's cause too. |
(*Store) TakeEncargo |
method | TakeEncargo gives a pending encargo to an agent, in its cargo. |
(*Store) WaitEncargo |
method | WaitEncargo notes that the agent that has it waits on a run. |
(*Store) ResumeEncargo |
method | ResumeEncargo is the end of a wait: the run finished (note says how). |
(*Store) DeliverEncargo |
method | DeliverEncargo hands an encargo over with its result and links. |
(*Store) ReviewEncargo |
method | ReviewEncargo is the person's answer to a delivered encargo: accepted (reviewed), or sent back with a comment, pending again for any agent. |
(*Store) ReleaseEncargo |
method | ReleaseEncargo gives a taken encargo back (pending), e.g. |
(*Store) CancelEncargo |
method | CancelEncargo cancels an encargo that is not finished. |
(*Store) EncargosToEstimate |
method | EncargosToEstimate lists encargos nobody has estimated yet (new ones, old ones from before the estimator, ones a person asked to estimate again), the oldest first; not the dropped ones. |
(*Store) SaveEstimate |
method | SaveEstimate keeps the estimator's answer (difficulty 0: it could not estimate, and reason says why) and the route it implies, unless a person chose one already. |
(*Store) RouteEncargo |
method | RouteEncargo is a person's choice of who does a pending encargo: the platform's AI or their own agent. |
(*Store) ReestimateEncargo |
method | ReestimateEncargo forgets an encargo's estimate so the estimator rates it again (its detail changed, or the estimate failed). |
(*Store) EncargoForCoder |
method | EncargoForCoder is the first encargo of the coding agent's queue, in any organization (ErrNotFound when there is none). |
CoderEncargo |
struct | CoderEncargo is an encargo a platform agent took, with what became of it: how many times it took, delivered and gave it back, and how many times a person sent it back. |
(*Store) CoderRecord |
method | CoderRecord is the encargos an organization's platform agent (by its name) took, the most recent first: what it learns its estimates from, and its record on the AI page. |
(*Store) DoEncargos |
method | DoEncargos sends an organization's pending encargos to the platform's coding agent, and returns how many it sent. |
(*Store) GiveBackEncargo |
method | GiveBackEncargo is the coding agent letting an encargo go to the person's own agent, with what it did and what is left: pending again, for their agent, and no longer in its queue. |
(*Store) GiveBackEncargoCause |
method | GiveBackEncargoCause is GiveBackEncargo with why, as a short code (Cause*; one it does not know, or "", is left for ClassifyCause to read from the note). |
(*Store) AddEncargoSpent |
method | AddEncargoSpent adds to what the coding agent spent on an encargo. |
(*Store) EncargosOfSystemKey |
method | EncargosOfSystemKey lists the encargos a platform agent has (taken or waiting), in every organization. |
(*Store) EncargoForRun |
method | EncargoForRun is the encargo about a run that is not dropped (ErrNotFound when there is none). |
internal/store/encargos_rama.go¶
114 lines
| Name | Kind | Summary |
|---|---|---|
EncargoOfBranch |
func | EncargoOfBranch is the number of the encargo a branch was made for, or 0 when it is not an encargo's branch (a person's). |
(*Store) OpenEncargoOnBranch |
method | OpenEncargoOnBranch is the open encargo about a branch of an app, so a second one is not made for it: the encargo the branch was made for while it is open, else the newest about one of the branch's runs. |
(*Store) NoteEncargo |
method | NoteEncargo adds a note to an open encargo's detail (a new failure on its branch, say), so whoever has it reads it there. |
(*Store) RunBranch |
method | RunBranch is the branch of a run and its app's default branch. |
RamaDeEncargo |
func | RamaDeEncargo is the branch an encargo is worked on: its run's, when it came from a run of a branch that is not the default one; else a branch of its own, named by its kind, its number and the first words of its title, so a list of branches says what each one is and what it is about: fix/ for an encargo about a failed run, feature/ for anything else. |
isSlugRune |
func |
internal/store/enseco.go¶
160 lines
| Name | Kind | Summary |
|---|---|---|
(*Store) PublishedRelease |
method | PublishedRelease is the app's release that is live: the newest one that was deployed (a release a pre-deploy task blocked never was), or ErrNotFound. |
(*Store) SetRunDry |
method | SetRunDry records what the run checks en seco: the release they run against (0 with a note when none ran), and whether one failed. |
(*Store) SaveRunDryTask |
method | SaveRunDryTask records a check's state en seco (and the tail of its log). |
(*Store) RunDryTasks |
method | RunDryTasks are the run's checks en seco, without their logs, in the order they started. |
(*Store) RunDryTaskLog |
method | RunDryTaskLog is the log of one of the run's checks en seco. |
(*Store) SetRunDryCopy |
method | SetRunDryCopy records what the run checks en seco against a copy of the branch: which copy, where it answers, why none ran, whether a check failed there. |
(*Store) RunDryCopy |
method | RunDryCopy is what the run checked en seco against a copy of the branch, with its checks (without their logs), or ErrNotFound. |
(*Store) SaveRunDryCopyTask |
method | SaveRunDryCopyTask records a check's state en seco against the copy (and the tail of its log). |
(*Store) RunDryCopyTaskLog |
method | RunDryCopyTaskLog is the log of one of the run's checks en seco against the copy. |
(*Store) DryCopyGone |
method | DryCopyGone marks the copies of app's pull request number gone, on the runs whose checks ran against it en seco: their page stops linking to it. |
internal/store/events.go¶
66 lines
| Name | Kind | Summary |
|---|---|---|
(*Store) Notify |
method | Notify sends payload on a NOTIFY channel. |
(*Store) Listen |
method | Listen calls fn with each notification on channel, on a connection of its own, until ctx ends or the connection fails. |
(*Store) PutEvent |
method | PutEvent stores a large event and returns its id. |
(*Store) GetEvent |
method | GetEvent reads a stored event. |
(*Store) PruneEvents |
method | PruneEvents deletes stored events older than before. |
internal/store/forjas.go¶
144 lines
| Name | Kind | Summary |
|---|---|---|
GitLabConnection |
struct | GitLabConnection is one GitLab rendimiento works with: gitlab.com or a GitLab of one's own (migration 0060). |
scanGitLab |
func | |
(*Store) AddGitLabConnection |
method | AddGitLabConnection keeps a new GitLab, or the same address again with a new application (it is reconnected, keeping its id). |
(*Store) GitLabConnection |
method | GitLabConnection is one connection, or ErrNotFound. |
(*Store) GitLabConnections |
method | GitLabConnections lists every connection, the oldest first. |
(*Store) SetGitLabUsername |
method | SetGitLabUsername records who rendimiento acts as on the connection, once a person authorized it. |
(*Store) DeleteGitLabConnection |
method | DeleteGitLabConnection forgets a connection; its apps, if any, stay and cannot build until it is connected again. |
Identity |
struct | Identity is a person's account on another forja, linked to them: signing in with it is signing in as Login. |
(*Store) LinkIdentity |
method | LinkIdentity links an account to login. |
(*Store) IdentityLogin |
method | IdentityLogin is the person an account is linked to ("" when none). |
(*Store) Identities |
method | Identities lists the accounts linked to login. |
(*Store) UnlinkIdentity |
method | UnlinkIdentity removes one of login's accounts. |
internal/store/inicio.go¶
93 lines
| Name | Kind | Summary |
|---|---|---|
SeccionInicio |
struct | SeccionInicio is one section of the home page and whether it shows. |
InicioPredeterminado |
struct | InicioPredeterminado is the home page an administrator of the platform set for whoever never chose theirs. |
(*Store) GetInicio |
method | GetInicio is the person's own home page, or nil when they never chose one. |
(*Store) SaveInicio |
method | SaveInicio keeps the person's home page. |
(*Store) DeleteInicio |
method | DeleteInicio forgets the person's home page: they see the default again. |
(*Store) GetInicioPredeterminado |
method | GetInicioPredeterminado is the default an administrator set, or nil. |
(*Store) SaveInicioPredeterminado |
method | SaveInicioPredeterminado sets the home page of everyone who never chose theirs. |
(*Store) DeleteInicioPredeterminado |
method | DeleteInicioPredeterminado goes back to the built-in default. |
internal/store/instalacion.go¶
96 lines
| Name | Kind | Summary |
|---|---|---|
EstadoInstalacion |
struct | EstadoInstalacion is what the setup page needs to know about the platform. |
(*Store) EstadoInstalacion |
method | EstadoInstalacion reads the platform's installation state. |
(*Store) MarcarInstalada |
method | MarcarInstalada records that the setup page finished; by is who became the first administrator. |
Acceso |
struct | Acceso is a person who may sign in: their name in rendimiento, whether they administer an organization, and the accounts linked to them on other forjas. |
(*Store) Accesos |
method | Accesos lists every member of any organization (demo links' guests aside, who come in by their link), with their linked accounts. |
internal/store/libreta.go¶
231 lines
| Name | Kind | Summary |
|---|---|---|
(*Store) RutaOfApp |
method | RutaOfApp lists an app's to-dos and decisions that are not archived, newest first. |
(*Store) RutaBranches |
method | RutaBranches are the branches each entry is worked on, oldest link first. |
(*Store) LinkRutaBranch |
method | LinkRutaBranch notes that an entry is worked on a branch (once). |
AppEncargo |
struct | AppEncargo is an encargo about an app, with why it was cancelled. |
(*Store) EncargosOfApp |
method | EncargosOfApp lists every encargo about an app (the reviewed and the cancelled ones too), newest first, with the note it was cancelled with. |
KeptBranch |
struct | KeptBranch is what rendimiento wrote down about a branch an entry is worked on: when it was merged (its head commit then) and the release that carried it, so the libreta knows it after its runs are gone. |
(*Store) RutaBranchesKept |
method | RutaBranchesKept is what was kept of each entry's branches: entry → branch → what is known. |
(*Store) LinkRutaRefs |
method | LinkRutaRefs links a branch to the entries a commit names (a «Ruta: N» trailer), when they are of the organization, not archived, and about the app or about none. |
(*Store) LinkCargoEntries |
method | LinkCargoEntries links a branch an agent ran in its cargo to the to-dos and decisions about that app it wrote or changed in the same cargo. |
(*Store) LinkCargoLaunches |
method | LinkCargoLaunches links an entry an agent wrote or changed in its cargo to the branches of the entry's app it ran (ejecucion_lanzar) earlier in the same cargo. |
(*Store) MarkRutaMerged |
method | MarkRutaMerged writes down that a branch was merged (its head commit, and when), on every link to it from the app's entries (or from entries about no app) that did not know it yet. |
(*Store) MarkRutaReleased |
method | MarkRutaReleased writes down the release that carried the app's merged branches: a release passed its verification, and its run (created at built) came after their merge, so it holds them. |
(*Store) KeepRutaBranch |
method | KeepRutaBranch writes down what the libreta worked out of an entry's branch (its merge, the release that carried it) where nothing was kept yet: what was written when it happened wins. |
internal/store/llaves.go¶
47 lines
| Name | Kind | Summary |
|---|---|---|
Llave |
struct | Llave is a key changed on the Environment page: who changed it, when, and when it expires (nil: it does not, or its service does not say). |
(*Store) Llaves |
method | Llaves are the keys changed here, by their name. |
(*Store) AnotarLlave |
method | AnotarLlave records that por changed a key now, with its expiry, and returns the row with its new version. |
internal/store/marcador.go¶
122 lines
| Name | Kind | Summary |
|---|---|---|
AppDay |
struct | AppDay is one app's numbers of a day, for the summary's scoreboard. |
(*Store) DayBoard |
method | DayBoard is each app's numbers between from and to, in the time zone of from: the scoreboard of the day's summary. |
(*Store) EncargosToReview |
method | EncargosToReview counts an organization's encargos delivered and waiting for a person. |
internal/store/mis_comentarios.go¶
103 lines
| Name | Kind | Summary |
|---|---|---|
MiComentario |
struct | MiComentario is a comment a person of this installation wrote to the team (decision 145), with its answer once it came. |
(*Store) GuardarMiComentario |
method | GuardarMiComentario keeps a comment this installation sent. |
(*Store) misComentarios |
method | |
(*Store) MisComentarios |
method | MisComentarios are a person's comments, newest first. |
(*Store) ComentariosSinRespuesta |
method | ComentariosSinRespuesta are the comments still waiting for an answer, written within the last 90 days (an older one is not asked about again). |
(*Store) GuardarRespuestaRecibida |
method | GuardarRespuestaRecibida keeps the answer that came for a comment. |
(*Store) RespuestasEquipoSinVer |
method | RespuestasEquipoSinVer is how many answers a person has not seen. |
(*Store) VerRespuestasEquipo |
method | VerRespuestas marks a person's answers as seen. |
(*Store) RespuestaDeOpinion |
method | RespuestaDeOpinion is the answer to comment id, for the installation that holds the token whose hash is ficha: ok is false when there is no such comment or the token is not its own, and answered false while no person has answered it. |
internal/store/opiniones.go¶
390 lines
| Name | Kind | Summary |
|---|---|---|
Opinion |
struct | Opinion is what someone wrote to the team (decision 145): from an installation (Origen "app", with its Datos and the hash of its token for the answer) or from the public form (Origen "formulario", with an email kept apart, in opinion_correos). |
Clasificacion |
struct | Clasificacion is what the platform's AI made of a comment, or why it could not (Error). |
(*Store) GuardarClasificacion |
method | GuardarClasificacion keeps what the AI made of a comment. |
(*Store) OpinionesSinClasificar |
method | OpinionesSinClasificar are the comments the AI has not looked at yet, oldest first. |
(*Store) OpinionesClasificadas |
method | OpinionesClasificadas are the latest comments the AI classified, newest first: what a new one may group with. |
NuevaOpinion |
struct | NuevaOpinion is a comment to keep: Remitente is who sent it (an address, never kept as it is), Ficha the hash of an installation's token and Correo the form's email. |
(*Store) GuardarOpinion |
method | GuardarOpinion keeps a comment, within the limits: at most OpinionesPorHora from one sender in an hour and OpinionesPorDia in all in a day (ErrDemasiados). |
(*Store) salOpiniones |
method | salOpiniones is this platform's salt for the senders' hashes, made the first time (32 random bytes, in platform_settings). |
(*Store) Opiniones |
method | Comentarios are the comments kept here, newest first (limite at most), without the emails: those only go out with an answer. |
(*Store) opiniones |
method | |
OpinionDetalle |
struct | OpinionDetalle is a comment with what only the team's page shows: the form's email (until it is deleted) and who answered, when. |
(*Store) GetOpinion |
method | GetOpinion is one comment with its email and answer. |
CambioOpinion |
struct | CambioOpinion is what a person changes of a comment on the team's page: its class, its state (set aside, or back to review), its group (0: none) and its draft. |
(*Store) CambiarOpinion |
method | CambiarOpinion changes a comment as a person said. |
(*Store) ResponderOpinion |
method | ResponderOpinion keeps the answer a person sent, with their name. |
(*Store) Reclasificar |
method | Reclasificar puts a comment back for the AI to sort and draft again. |
(*Store) PasarALaRuta |
method | PasarALaRuta makes a comment an idea in the Ruta, as a person asked (a to-do tagged idea and comentario, with the comment's words quoted and what the AI made of it), and, while it is not answered, puts it back for the AI to draft its answer again, now saying it was noted. |
tituloEnLaRuta |
func | tituloEnLaRuta: "Idea de un comentario: " and the comment's first words. |
cuerpoEnLaRuta |
func | cuerpoEnLaRuta is the entry's body: where it came from, the comment quoted as it was written, and the AI's summary. |
(*Store) BorrarCorreosVencidos |
method | BorrarCorreosVencidos deletes the emails of comments answered 30 days ago or more, and of those set aside (decision 145). |
(*Store) OpinionesPorRevisar |
method | OpinionesPorRevisar is how many comments wait for a person. |
internal/store/orgs.go¶
316 lines
| Name | Kind | Summary |
|---|---|---|
RoleRank |
func | RoleRank orders roles: a route asks for a minimum rank (0 for unknown). |
Member |
struct | Member is a person in an organization. |
(*Store) MemberRole |
method | MemberRole is a person's role in an organization (ErrNotFound when they are not in it). |
(*Store) Members |
method | Members lists an organization's people, administrators first. |
(*Store) SetMember |
method | SetMember adds a person to an organization, or changes their role; an organization never loses its last administrator. |
(*Store) RemoveMember |
method | RemoveMember takes a person out of an organization (not its last administrator). |
lastAdmin |
func | lastAdmin refuses a change that would take away the organization's only administrator (login is the person losing the role). |
(*Store) IsMemberAnywhere |
method | IsMemberAnywhere reports whether a person belongs to any organization: who may sign in. |
(*Store) SeedAdmins |
method | SeedAdmins makes the logins administrators of the default organization when it has no members yet: ALLOWED_USERS, the way people were let in before organizations, starts it off. |
Org |
struct | Org is an organization, with the role of the person asking when listed for them. |
(*Store) OrgsOf |
method | OrgsOf lists the organizations a person belongs to, with their role, the default one first. |
(*Store) GetOrg |
method | GetOrg returns one organization. |
(*Store) CreateOrg |
method | CreateOrg makes an organization with its first administrator. |
(*Store) AllOrgs |
method | AllOrgs lists every organization (for the platform's operators). |
OrgInstallation |
struct | OrgInstallation is a GitHub installation an organization other than the platform's may create apps from (the platform's uses every one the App allows). |
(*Store) OrgInstallations |
method | OrgInstallations lists the installations given to an organization, or to every organization when orgID is 0 (for the operators). |
(*Store) OrgHasInstallation |
method | OrgHasInstallation reports whether the organization may use the installation. |
(*Store) AddOrgInstallation |
method | AddOrgInstallation lets an organization use an installation (giving it again changes nothing). |
(*Store) RemoveOrgInstallation |
method | RemoveOrgInstallation takes an installation away from an organization (ErrNotFound when it did not have it). |
internal/store/platicas.go¶
275 lines
| Name | Kind | Summary |
|---|---|---|
Platica |
struct | Platica is the conversation about one Ruta entry: who answers it, «la idea hasta ahora» (the summary the AI keeps and people may correct), what its AI cost, and what came out of it (a decision, encargos). |
PlaticaMensaje |
struct | PlaticaMensaje is one message, signed: Author is the person's login, the AI's model or the agent key's name, by Kind. |
platicaSelect |
func | platicaSelect reads conversations; Thinking holds for platicaThinking. |
scanPlatica |
func | |
(*Store) PlaticaDe |
method | PlaticaDe is the conversation about an entry (ErrNotFound: nobody started one yet). |
(*Store) PlaticaPorID |
method | PlaticaPorID is one conversation. |
(*Store) AbrirPlatica |
method | AbrirPlatica is the conversation about an entry, started now by who when there was none. |
scanMensaje |
func | |
(*Store) MensajesDePlatica |
method | MensajesDePlatica are a conversation's messages after the one numbered after (0: from the first), oldest first, at most limit (0: 500). |
(*Store) AgregarMensaje |
method | AgregarMensaje keeps a signed message and adds what it cost to the conversation's spending, at once. |
(*Store) GastoPlatica |
method | GastoPlatica adds what a call about a conversation cost that left no message (the proposal of encargos). |
(*Store) ElegirIAPlatica |
method | ElegirIAPlatica is who answers a conversation from now on. |
(*Store) GuardarIdea |
method | GuardarIdea keeps «la idea hasta ahora», by who wrote it (a person, or the AI's model). |
(*Store) PermitirMasPlatica |
method | PermitirMasPlatica lets a conversation spend micros more than its cap: a person said to go on. |
(*Store) PlaticaHecha |
method | PlaticaHecha notes what came out of a conversation: the decision entry it was saved as (nil: none) and the encargos made of it. |
(*Store) platicaSet |
method | |
(*Store) TomarTurnoPlatica |
method | TomarTurnoPlatica holds the AI's turn on a conversation: false when another answer is being written (that one answers what came meanwhile). |
(*Store) SoltarTurnoPlatica |
method | SoltarTurnoPlatica ends the AI's turn. |
(*Store) PlaticasEsperando |
method | PlaticasEsperando are the organization's conversations that chose the person's own agent and whose last message is a person's: waiting for an agent to answer over MCP. |
(*Store) PlaticaTope |
method | PlaticaTope is what one conversation of the organization may spend on paid models before it asks whether to go on. |
(*Store) SetPlaticaTope |
method | SetPlaticaTope is what one conversation may spend before it asks. |
PlaticaLlegoAlTope |
func | PlaticaLlegoAlTope says whether a conversation spent its cap and what people allowed past it. |
internal/store/preguntas.go¶
125 lines
| Name | Kind | Summary |
|---|---|---|
EncargoPregunta |
struct | EncargoPregunta is a question the coding agent asked about an encargo: what it asks, the options it offers (none, or 2 to 4), what it left itself to go on from and what it had spent; then the person's answer. |
scanPregunta |
func | |
(*Store) AskEncargo |
method | AskEncargo is the agent that has an encargo stopping to ask the person: it is asking, with nobody working on it, until answered. |
(*Store) AnswerEncargo |
method | AnswerEncargo is a person's answer to the question an encargo of their organization asks: it goes back to the coding agent's queue, to resume with the answer (ResumeAnswer). |
(*Store) PassAskedEncargo |
method | PassAskedEncargo gives an encargo that asks to the person's own agent, with the question in note: pending, for their agent, out of the coding agent's queue (as GiveBackEncargo). |
(*Store) OpenQuestion |
method | OpenQuestion is the question an encargo asks now (ErrNotFound when none). |
(*Store) ResumeAnswer |
method | ResumeAnswer is the answered question the coding agent resumes an encargo with, once: it is marked resumed (ErrNotFound when there is none, as for an encargo it never asked about). |
(*Store) UnansweredSince |
method | UnansweredSince lists the open questions asked before before, of encargos still asking, in every organization: the ones to pass to the person's own agent. |
internal/store/problems.go¶
148 lines
| Name | Kind | Summary |
|---|---|---|
Problem |
struct | Problem is one of the platform's own warnings or errors, with its repeats folded in. |
(*Store) RecordProblem |
method | RecordProblem adds an occurrence: a new row, or one more on the row with the same fingerprint, which also undoes a dismissal or resolution. |
(*Store) ListProblems |
method | ListProblems returns problems that happened since since, newest first; app filters to one app ("" for all), and dismissed ones are left out unless asked for. |
(*Store) OpenProblems |
method | OpenProblems counts problems that happened within ProblemOpenFor and are neither dismissed nor resolved, leaving out those of the apps in hide (apps the reader may not see). |
(*Store) ProblemApp |
method | ProblemApp is the app a problem is about ("" for none; ErrNotFound when there is no such problem). |
(*Store) DismissProblem |
method | DismissProblem hides a problem until it happens again. |
(*Store) PruneProblems |
method | PruneProblems deletes problems that last happened before before. |
ProblemMatch |
struct | ProblemMatch picks the problems a fix resolves: same message, and the same app (when set) and attribute (when set, e.g. |
(*Store) ResolveProblems |
method | ResolveProblems marks the unresolved problems matching m as resolved, saying what fixed them; it returns how many it resolved. |
(*Store) ResolveQuietProblems |
method | ResolveQuietProblems marks as resolved the unresolved problems with one of messages that last happened before quietSince: work that is tried again by itself and has not failed since. |
internal/store/pruebas.go¶
81 lines
| Name | Kind | Summary |
|---|---|---|
(*Store) AppTests |
method | AppTests is what is kept of each of an app's tests, by name. |
(*Store) SaveTests |
method | SaveTests keeps a release's test results and each test's new state, in one transaction. |
ReleaseTest |
struct | ReleaseTest is one test's result in a release, with its state then. |
(*Store) ReleaseTests |
method | ReleaseTests are each release's test results, failures first. |
internal/store/puestos.go¶
72 lines
| Name | Kind | Summary |
|---|---|---|
Puesto |
struct | Puesto is a page of the Mercado: an app made from a form (see internal/mercado). |
scanPuesto |
func | scanPuesto reads a stall row. |
(*Store) CreatePuesto |
method | CreatePuesto records that app is a page of the Mercado. |
(*Store) UpdatePuesto |
method | UpdatePuesto keeps the Mercado's card in step with a saved page. |
(*Store) GetPuesto |
method | GetPuesto returns the page of an app, or ErrNotFound when the app is not one. |
(*Store) ListPuestos |
method | ListPuestos lists the Mercado, most recently changed first. |
internal/store/queuelock.go¶
80 lines
| Name | Kind | Summary |
|---|---|---|
(*Store) LockQueue |
method | LockQueue waits until this process owns the run queue: a Postgres advisory lock, held on a connection of its own until release is called or the process dies (Postgres then lets it go). |
(*Store) LockAgents |
method | LockAgents waits until this process is the one running the platform's agents (see LockQueue): during an update, the new pod's agents start once the old one's stop, so nothing is diagnosed twice. |
(*Store) lock |
method | lock holds an advisory lock on a connection of its own (see LockQueue). |
(*Store) LockToken |
method | LockToken waits until this process may refresh a forja connection's OAuth token (forja "gitlab" or "bitbucket", connection id): a Postgres advisory lock on a connection of its own, so two processes never refresh the same token at once (the forja replaces the refresh token on each use, and the second refresh would fail with the old one). |
internal/store/registro.go¶
167 lines
| Name | Kind | Summary |
|---|---|---|
LogLine |
struct | LogLine is one line of the platform's own log (the Log page): what one process logged at INFO or above, its secrets already removed. |
(*Store) AddLogLines |
method | AddLogLines writes lines of the platform's log, all at once. |
LogFilter |
struct | LogFilter picks lines of the platform's log. |
LogCursor |
func | LogCursor is where a page of the log ends: the next page starts with the line just older than this one. |
parseLogCursor |
func | |
(*Store) LogLines |
method | LogLines returns lines of the platform's log, newest first, and the cursor of the next (older) page, "" when there is none. |
(*Store) PruneLog |
method | PruneLog deletes the lines of the platform's log older than before. |
internal/store/reintentar.go¶
89 lines
| Name | Kind | Summary |
|---|---|---|
(*Store) RetryRun |
method | RetryRun queues a failed run again to run what did not pass: its steps that failed or were skipped go back to pending (a failed one counts one more try, and its log keeps the earlier attempt under a line saying so); those that passed keep their result and their image. |
(*Store) RecordStumble |
method | RecordStumble notes that a step of an app failed and then passed on the same commit, and says how many times that happened in StumbleWindow. |
(*Store) Stumbles |
method | Stumbles are an app's steps that stumbled in StumbleWindow, with how often. |
internal/store/release_tasks.go¶
81 lines
| Name | Kind | Summary |
|---|---|---|
ReleaseTask |
struct | ReleaseTask is one post-deploy task of a release (see spec.Task). |
(*Store) SaveReleaseTask |
method | SaveReleaseTask records a post-deploy task's state (and the tail of its log). |
(*Store) ReleaseTasks |
method | ReleaseTasks returns the post-deploy tasks of the given releases, by release ID, without their logs. |
(*Store) ReleaseTaskLog |
method | ReleaseTaskLog returns the log of one post-deploy task of an app's release. |
internal/store/resumen.go¶
219 lines
| Name | Kind | Summary |
|---|---|---|
DayFact |
struct | DayFact is one thing that happened on a day, as data for the summary: the app it is about ("" for the organization), and what happened, in plain English. |
DayCounts |
struct | DayCounts are a day's numbers, for a summary without a model. |
(*Store) DayFacts |
method | DayFacts is what an organization's apps, people and agents did between from and to. |
clip |
func | |
SummaryLine |
struct | SummaryLine is one line of a day's summary, about one app ("" for the organization). |
DaySummary |
struct | DaySummary is what was written of one day, in one language. |
(*Store) GetDaySummary |
method | GetDaySummary is a day's summary in a language (ErrNotFound when none was written yet). |
(*Store) SaveDaySummary |
method | SaveDaySummary keeps a day's summary, replacing one already written (Rehacer). |
(*Store) SummaryVisit |
method | SummaryVisit is the day a person last opened the summary in an organization ("" the first time), and records today as their visit. |
internal/store/ruta.go¶
435 lines
| Name | Kind | Summary |
|---|---|---|
AgentKey |
struct | AgentKey is a bearer token for the MCP endpoint (the token itself is never stored). |
(AgentKey) Writes |
method | Writes reports whether the key may write (any role above reader). |
(AgentKey) AllowsApp |
method | AllowsApp reports whether the key may see and act on an app. |
(AgentKey) Usable |
method | Usable reports whether the key may be used now. |
Cargo |
struct | Cargo is an agent's turn of work. |
RutaEntry |
struct | RutaEntry is one thing the platform knows: a decision, a manual, a pending task, a note, or something a person lived. |
AgentAction |
struct | AgentAction is one tool call made through the MCP endpoint. |
(*Store) CreateAgentKey |
method | CreateAgentKey stores a new key by its token's hash. |
scanAgentKey |
func | scanAgentKey reads an agent key row (never the key: only its hash is stored). |
(*Store) AgentKeyByHash |
method | AgentKeyByHash finds a key by its token's hash, and notes that it was used (at most once a minute, to keep writes down). |
(*Store) AgentKey |
method | AgentKey returns one key. |
(*Store) ListAgentKeys |
method | ListAgentKeys returns every key, newest first. |
(*Store) RevokeAgentKey |
method | RevokeAgentKey stops a key from working, and closes its open cargo. |
scanCargo |
func | scanCargo reads a cargo row. |
(*Store) SystemKey |
method | SystemKey is the agent key a platform agent signs with in an organization (the coding agent): made the first time, with a token nobody has, so it works only from inside the platform. |
(*Store) TakeCargo |
method | TakeCargo opens a cargo for a key; ErrCargoOpen if it already has one. |
(*Store) Cargo |
method | Cargo returns one cargo. |
(*Store) OpenCargo |
method | OpenCargo returns a key's open cargo, or ErrNotFound. |
(*Store) HandOver |
method | HandOver closes a cargo with its entrega and what is left. |
(*Store) ListCargos |
method | ListCargos returns cargos, newest first. |
scanRuta |
func | scanRuta reads a Ruta entry row. |
(*Store) AddRuta |
method | AddRuta stores a new entry. |
orgOr |
func | orgOr is an organization, or the default one when unset. |
(*Store) Ruta |
method | Ruta returns one entry. |
(*Store) UpdateRuta |
method | UpdateRuta replaces an entry's title, body, tags, done, app and why it was discarded, keeping the previous version in ruta_history. |
(*Store) ArchiveRuta |
method | ArchiveRuta hides an entry from lists (it is never deleted). |
(*Store) SearchRuta |
method | SearchRuta lists entries that are not archived, newest change first. |
(*Store) RecordAgentAction |
method | RecordAgentAction notes one tool call. |
AgentActionRow |
struct | AgentActionRow is a recorded tool call, for the UI. |
(*Store) ListAgentActions |
method | ListAgentActions returns the latest tool calls, newest first. |
internal/store/secretos.go¶
39 lines
| Name | Kind | Summary |
|---|---|---|
Secreto |
struct | Secreto is one sealed secret as kept: its nonce and ciphertext. |
(*Store) LeerSecreto |
method | LeerSecreto returns a sealed secret, or ErrNotFound. |
(*Store) GuardarSecreto |
method | GuardarSecreto keeps a sealed secret, replacing the one by that name. |
(*Store) BorrarSecreto |
method | BorrarSecreto removes a sealed secret; one that is not there is gone already. |
internal/store/senales.go¶
207 lines
| Name | Kind | Summary |
|---|---|---|
SenalesAjustes |
struct | SenalesAjustes are this installation's own settings for its señales de vida (internal/senales): its random identity, whether a person turned them off, whether the operators saw the notice that they are sent, and when the last one went out. |
SenalEnviada |
struct | SenalEnviada is a señal as it went, and when. |
(*Store) GetSenales |
method | GetSenales reads the settings, making the identity the first time: 16 random bytes, from nothing about the computer, the account or the domain. |
(*Store) SaveSenales |
method | SaveSenales writes the settings (the identity never changes). |
ConteosSenales |
struct | ConteosSenales are the counts a señal carries, over the last seven days where they move: nothing that names an app, a repository or a person. |
(*Store) Conteos |
method | Conteos counts what a señal carries. |
(*Store) RecibirSenal |
method | RecibirSenal keeps a señal from an installation: its first and last time, how many came, whether it is the team's own, and its last counts. |
ResumenSenales |
struct | ResumenSenales is what the received señales say: installations heard of in the last 7 and 28 days, outside the team (the number that counts) and the team's own, and the outside ones of the last 28 days by mode, engine and version. |
(*Store) Resumen |
method | Resumen sums up the received señales. |
Instalacion |
struct | Instalacion is one installation that sent señales, as received. |
(*Store) ListarInstalaciones |
method | ListarInstalaciones are the installations heard of, the most recent first. |
(*Store) MarcarEquipo |
method | MarcarEquipo says whether an installation is the team's own, counted apart (ErrNotFound when no señal came from it). |
internal/store/stats.go¶
363 lines
| Name | Kind | Summary |
|---|---|---|
DeliveryStats |
struct | DeliveryStats summarize how the platform shipped over a period: the public stats page's headline numbers. |
Count |
struct | Count is a number for a day. |
(*Store) Delivery |
method | Delivery computes DeliveryStats for the days since days ago, with days counted in time zone tz (an IANA name). |
(*Store) DeliveryBetween |
method | DeliveryBetween computes the summary numbers of DeliveryStats for what happened in [from, to); DeploysPerDay is left empty. |
DeliveryWeek |
struct | DeliveryWeek is one week of DeliveryStats' headline numbers, for trends. |
(*Store) DeliveryWeeks |
method | DeliveryWeeks returns weeks seven-day windows ending at now, oldest first. |
SiteStats |
struct | SiteStats is the public view of one app's public URL check. |
DayRatio |
struct | DayRatio is a day's share of successful checks (nil: no checks that day). |
(*Store) PublicSites |
method | PublicSites returns every public URL check with its uptime over 24 hours and 30 days, its typical response time and its daily uptime for days days (days counted in time zone tz). |
ReleaseEvent |
struct | ReleaseEvent is one release, for the public activity feed. |
(*Store) RecentReleases |
method | RecentReleases lists the newest releases across all apps. |
ActiveRun |
struct | ActiveRun is a run waiting or in progress, as the welcome page shows it: which app, and since when; nothing about the commit. |
(*Store) ActiveRuns |
method | ActiveRuns lists the runs queued or running, oldest first. |
(*Store) RunsGoingOn |
method | RunsGoingOn are the runs queued or running of the given apps, oldest first, each with its steps (without their messages): what the Apps page's "Running now" shows. |
(*Store) RunsDone |
method | RunsDone are the last n runs of the given apps that ended, newest first, without their steps. |
(*Store) RecentReleaseImages |
method | RecentReleaseImages are the images of each app's last perApp releases: what a rollback could need, so the registry must keep them. |
internal/store/store.go¶
894 lines
| Name | Kind | Summary |
|---|---|---|
Store |
struct | Store is the platform's Postgres database. |
Open |
func | Open connects to Postgres; call Migrate before use. |
(*Store) Close |
method | Close releases the connection pool. |
(*Store) Migrate |
method | Migrate applies embedded migrations in filename order, each once. |
App |
struct | App is an onboarded application: its repo, installation and the rendimiento.yaml of its default branch. |
(*App) ForjaOf |
method | ForjaOf is the app's forja, GitHub when it says none. |
scanApp |
func | scanApp reads an app row (with its spec, stored as JSON). |
(*Store) CreateApp |
method | CreateApp inserts an app, in its organization (the default one when not set); names are unique across organizations (an app is a namespace). |
(*Store) UpdateAppSpec |
method | UpdateAppSpec stores the latest rendimiento.yaml of the default branch. |
(*Store) GetApp |
method | GetApp returns an app by name, or ErrNotFound. |
(*Store) GetAppByID |
method | GetAppByID returns an app by ID, or ErrNotFound. |
(*Store) AppsForRepo |
method | AppsForRepo returns every app deployed from a repo (webhooks fan out to them). |
(*Store) ListAppsInOrg |
method | ListAppsInOrg returns an organization's apps, by name. |
(*Store) ListApps |
method | ListApps returns every app, by name. |
(*Store) ListReleasedApps |
method | ListReleasedApps lists the apps with at least one release: the ones that have been live. |
(*Store) listApps |
method | listApps runs a query that returns app rows. |
(*Store) DeleteApp |
method | DeleteApp removes an app and, through foreign keys, its runs and releases. |
Run |
struct | Run is one CI run: a commit of an app built (and on the default branch, released). |
DryRun |
struct | DryRun is what a branch's run checked en seco: its new post-deploy checks, against the release already published, and against a copy of the branch (Copy). |
DryCopy |
struct | DryCopy is what a branch's run checked en seco against a copy of the branch: its pull request's, or a short copy made only for the checks. |
(*Run) DryFailed |
method | DryFailed says whether a check run en seco failed: the run is not merged by itself, and its check asks a person. |
Step |
struct | Step is one test or build step of a run, with its result. |
scanRun |
func | scanRun reads a run row, without its steps. |
(*Store) CreateRun |
method | CreateRun queues a run with its planned steps. |
(*Store) ClaimRun |
method | ClaimRun takes the oldest queued run, of an app not in skip (those with a run going), and marks it running. |
Busy |
struct | Busy is what the runs going rule out for the next one: apps that have as many runs going as they may (Full), apps with a deploying run going (Deploying: their next deploy waits, so releases keep their order), and branches with a run going (" |
(*Store) ClaimRunFor |
method | ClaimRunFor takes the oldest queued run that b does not rule out, and marks it running (ErrNotFound when there is none). |
(*Store) RequeueOrphans |
method | RequeueOrphans handles runs left "running" by a process that died: they are queued again from scratch (builds are repeatable), up to maxAttempts, after which they are marked failed. |
(*Store) SetCheckRun |
method | SetCheckRun remembers the GitHub check run that mirrors a run. |
(*Store) CreateRejectedRun |
method | CreateRejectedRun records a run that failed before it could start (its rendimiento.yaml was invalid): it is created finished, with no steps, so no worker ever claims it. |
(*Store) FinishRun |
method | FinishRun records a run's outcome and closes any step still pending or running. |
(*Store) CancelQueued |
method | CancelQueued cancels queued runs of an app on a branch (superseded by a newer push). |
(*Store) RunAt |
method | RunAt is the app's latest run of a commit on a branch (without its steps). |
(*Store) TriedOn |
method | TriedOn reports whether the app has a run of the commit on the branch that is queued, running or passed: a failed or cancelled one does not count, so trying again still runs. |
(*Store) SetRunMerge |
method | SetRunMerge records what became of the pull request of a run that passed, in its message too. |
(*Store) SetRunUntested |
method | SetRunUntested records what of the run's change no step builds or tests. |
(*Store) LastRunOf |
method | LastRunOf is the app's latest run of a branch (without its steps). |
(*Store) ApproveRun |
method | ApproveRun records who said the run's commit is to be merged. |
(*Store) GetRun |
method | GetRun returns a run with its steps. |
(*Store) ListRuns |
method | ListRuns returns an app's most recent runs, newest first. |
(*Store) UpdateStep |
method | UpdateStep records a step's status, digest, message and times. |
(*Store) UpdateStepTimes |
method | UpdateStepTimes is UpdateStep, returning when the step started and finished as stored (a step keeps the start of its first update), so the live event says the same as a reload. |
(*Store) AppendLog |
method | AppendLog adds output to a step's log, keeping at most maxLog bytes (the tail, where errors are). |
(*Store) StepLog |
method | StepLog returns a step's stored log, or, once archived, the key of its object in the log archive (and an empty log). |
ArchivableStep |
struct | ArchivableStep is a finished run's step whose log is still in Postgres. |
(*Store) UnarchivedSteps |
method | UnarchivedSteps lists up to limit steps with a log in Postgres, of runs that finished before before (their logs are complete), oldest first. |
(*Store) MarkArchived |
method | MarkArchived records that a step's log (bytes long, in bytes) is stored under ref and empties the column. |
(*Store) ArchiveStats |
method | ArchiveStats counts archived logs and their size, and logs waiting to be archived. |
Release |
struct | Release is what was deployed: the images (by digest) and spec of one successful run, or of a rollback. |
(*Store) SetVerification |
method | SetVerification records a release's verification state and message. |
(*Store) VerifyingReleases |
method | VerifyingReleases lists releases whose verification was interrupted (the process stopped while watching them). |
(*Store) CreateRelease |
method | CreateRelease assigns the next release number for the app. |
scanRelease |
func | scanRelease reads a release row (images and spec are JSON). |
(*Store) GetRelease |
method | GetRelease returns an app's release by number. |
(*Store) LatestRelease |
method | LatestRelease returns the app's newest release, or ErrNotFound. |
(*Store) ListReleases |
method | ListReleases returns an app's most recent releases, newest first. |
(*Store) CreateSession |
method | CreateSession stores a login session by the hash of its token. |
(*Store) SessionInfo |
method | SessionInfo returns a valid session's GitHub login and the organization it works in, or ErrNotFound. |
(*Store) SetSessionOrg |
method | SetSessionOrg moves a session to another organization. |
(*Store) SessionLogin |
method | SessionLogin returns the GitHub login of a valid session, or ErrNotFound. |
(*Store) DeleteSession |
method | DeleteSession ends a session and removes expired ones. |
nullTime |
func | nullTime is nil for the zero time, so it is stored as NULL. |
IsUniqueViolation |
func | IsUniqueViolation reports a duplicate key (e.g. |
(*Store) Ping |
method | Ping checks the database connection. |
(*Store) SetAppAutoMerge |
method | SetAppAutoMerge is whether rendimiento merges the app's pull requests once their branch passes, and whether any open one (anyPull) or only the runs a person approved. |
(*Store) SetAppAutoEncargo |
method | SetAppAutoEncargo is an app's own choice of when an encargo opens by itself for a failed run ("" to follow the organization). |
internal/store/traces.go¶
208 lines
| Name | Kind | Summary |
|---|---|---|
Trace |
struct | Trace is one kept request: its root span and what it went through. |
Span |
struct | Span is one step of a trace. |
SpanEvent |
struct | SpanEvent is something a span recorded at a moment (an exception, a log). |
partition |
func | partition names a day's partition of a trace table: traces_20261018. |
(*Store) EnsureTracePartitions |
method | EnsureTracePartitions creates the partitions of the days around now (UTC): yesterday, today and tomorrow. |
(*Store) DropTracePartitions |
method | DropTracePartitions drops the days before before (UTC) and says how many partitions went. |
(*Store) SaveTraces |
method | SaveTraces writes kept traces and their spans (spans of traces already saved may come later on their own). |
orEmpty |
func | |
TraceQuery |
struct | TraceQuery narrows ListTraces. |
(*Store) ListTraces |
method | ListTraces lists kept requests, newest first. |
(*Store) GetTrace |
method | GetTrace returns a request's summary and its spans in start order (ErrNotFound when it was not kept or has expired). |
internal/store/uptime.go¶
330 lines
| Name | Kind | Summary |
|---|---|---|
Probe |
struct | Probe is one uptime check of one service: inside the cluster ("internal") or through its public URL ("public"). |
Incident |
struct | Incident is an outage of one check: from its first failed check until the next successful one (EndedAt is nil while it lasts). |
(*Store) RecordProbes |
method | RecordProbes saves a round of checks. |
(*Store) OpenIncident |
method | OpenIncident records the start of an outage and returns its ID. |
(*Store) CloseIncident |
method | CloseIncident records the end of an outage. |
(*Store) OpenIncidents |
method | OpenIncidents lists the outages still going on, across all apps: what a restarted prober picks up. |
(*Store) Incidents |
method | Incidents lists an app's outages that overlap [since, now], newest first. |
(*Store) incidents |
method | incidents runs a query for outages (where is its WHERE clause). |
(*Store) RollupProbes |
method | RollupProbes (re)computes the hourly summaries of every hour from since's hour on. |
(*Store) PruneProbes |
method | PruneProbes deletes checks older than 7 days and summaries older than 400 days (the hourly summaries keep the long-range charts). |
UptimeBucket |
struct | UptimeBucket is one point of a chart: the checks in [At, At+bucket). |
UptimeSeries |
struct | UptimeSeries is one check's history over a range: totals, response time percentiles (of successful checks) and the chart's buckets. |
(*Store) Uptime |
method | Uptime returns every check of an app over [since, now] in buckets of the given size. |
(*Store) AnsweredChecks |
method | AnsweredChecks lists the checks (app, service and kind) that have succeeded at least once in the kept history (400 days of hourly summaries, plus the checks not summarized yet). |
(*Store) LatestProbes |
method | LatestProbes is the newest check since a time of every app, service and kind: the health the Universe page shows on each service. |
(*Store) UptimeSummary |
method | UptimeSummary is the share of successful checks per app since a time: the dashboard's uptime badges. |
CheckStats |
struct | CheckStats summarizes one check's results over a period. |
(*Store) ProbeStats |
method | ProbeStats summarizes an app's checks in [from, to), per service and check kind: the baseline a new release is compared with. |
internal/store/uso.go¶
268 lines
| Name | Kind | Summary |
|---|---|---|
VistaUso |
struct | VistaUso is one page shown: its route pattern, the pattern it came from ("" on the first of a visit) and, when it could be measured, how long it took to show its data. |
AccionUso |
struct | AccionUso is one main action taken on a page. |
(*Store) AnotarUso |
method | AnotarUso adds views and actions to the day's totals (dia in UTC). |
cubeta |
func | cubeta is the time-to-data bucket of ms (0 to 4). |
ordenadas |
func | |
ordenadasPar |
func | |
PaginaUso |
struct | PaginaUso is a page's totals over a period. |
PasoUso |
struct | PasoUso is how many times people went from one page to another. |
AccionUsada |
struct | AccionUsada is how many times an action was taken on a page. |
ResumenUso |
struct | ResumenUso is the use since a day: the pages, the moves between them and the actions, the most frequent first (at most 100 of each). |
(*Store) LeerUso |
method | LeerUso adds up the use from desde (a UTC day, included) to today. |
(*Store) PruneUso |
method | PruneUso deletes the days before before (a UTC day). |
UsoAjuste |
struct | UsoAjuste is whether the interface's use is measured (on unless an administrator turned it off), and who changed it last. |
(*Store) GetUso |
method | GetUso reads the switch (on when never set). |
(*Store) SetUso |
method | SetUso turns measuring on or off. |
internal/store/vigia.go¶
479 lines
| Name | Kind | Summary |
|---|---|---|
VigiaPaso |
struct | VigiaPaso is one step of one app over the week, and over the three weeks before it (Antes). |
VigiaApp |
struct | VigiaApp is one app's runs over the week, and the three weeks before. |
VigiaTropiezo |
struct | VigiaTropiezo is a step that failed and then passed on the same commit. |
VigiaLinea |
struct | VigiaLinea is one message of the platform's log at WARN or ERROR: how many times, on how many days, since when, and how many times in the three weeks before. |
VigiaRuta |
struct | VigiaRuta is a route of the API that answered slowly (over a second). |
VigiaProblema |
struct | VigiaProblema is a problem still open that happened this week. |
VigiaDatos |
struct | VigiaDatos is what the lookout reads of a week. |
(*Store) LeerVigia |
method | LeerVigia adds up the week from desde to hasta, and the three weeks before it for comparison (the log keeps 30 days). |
collect |
func | collect runs a query and reads each row with read. |
VigiaRevision |
struct | VigiaRevision is one review by the lookout, and its findings. |
VigiaHallazgo |
struct | VigiaHallazgo is one finding: what the lookout saw, its evidence, and what a person decided. |
(*Store) EmpezarRevision |
method | EmpezarRevision starts a review of the week since desde, asked by por ("" for the weekly one), unless one is going on. |
(*Store) TerminarRevision |
method | TerminarRevision keeps how a review ended and its findings. |
leerHallazgo |
func | |
(*Store) UltimaRevision |
method | UltimaRevision is the latest review, finished or not, with its findings (ErrNotFound before the first). |
(*Store) UltimaTerminada |
method | UltimaTerminada is when the latest review that finished ended well or not: the weekly one waits a week after one that was done, a day after one that failed. |
(*Store) VigiaDecididos |
method | VigiaDecididos are the findings people decided that the lookout must not propose again, the latest of each key first. |
(*Store) Hallazgo |
method | Hallazgo is one finding (ErrNotFound if there is none). |
(*Store) DecidirHallazgo |
method | DecidirHallazgo marks a new finding as decided (encargo, ruta or descartado) by por, once: ErrVigiaDecidido when someone did already. |
(*Store) EnlazarHallazgo |
method | EnlazarHallazgo keeps the encargo or the Ruta entry a finding became. |
(*Store) DeshacerHallazgo |
method | DeshacerHallazgo puts a finding back to new, when what it was to become could not be made. |
(*Store) VigiaNuevos |
method | VigiaNuevos is how many findings of the latest review nobody decided yet. |
VigiaAjuste |
struct | VigiaAjuste is whether the lookout reviews each week (on unless an administrator turned it off), what it may spend a month, and who changed it last. |
(*Store) GetVigia |
method | GetVigia reads the lookout's settings (on, with VigiaTope, when never set). |
(*Store) SetVigia |
method | SetVigia keeps the lookout's settings. |
(*Store) AISpentBy |
method | AISpentBy is what one source spent of an organization's AI this month. |
internal/store/ai_test.go¶
66 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestAI |
func | AI settings default to the local model; spending adds up by who paid, this month only, and the platform's bill sums every organization. |
internal/store/arreglos_test.go¶
61 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestFixRuns |
func | Fix runs are kept with who asked, their files and log; Renovate's branch gets a fix once a commit; and a commit a fix made is known as one. |
internal/store/bitacora_test.go¶
79 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestBitacoraCadena |
func | The bitácora is a chain per organization: it holds as written, and it shows a row changed or removed in the database, from that row on. |
internal/store/bitbucket_test.go¶
43 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestBitbucketConnections |
func | A Bitbucket workspace is kept once (connecting it again keeps its id), and its apps say so. |
internal/store/caminos_test.go¶
55 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestRunHistory |
func |
internal/store/cola_test.go¶
122 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCoderQueue |
func | The coding agent's queue: in the order a person gave it (the rest after, the oldest first), with its organization's concurrency; an app chosen later puts an encargo in it; a stop is asked only of one a platform agent has; and what it finished waits for the person's review. |
internal/store/comentarios_test.go¶
86 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestComentarios |
func | A person comments on a handed-over cargo and on an encargo (which stays as it was); an agent answers one; the answer is new for the person until they see it, and only people's comments wait for an answer. |
internal/store/cuentas_test.go¶
257 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestCoderCuentas |
func | How the coding agent is doing, counted from a log: what it finished (at the first try or after giving it back), gave back and has; what the person answered to its first delivery; why it gave back, recorded or read from old notes; spent over estimate by band; the warning of three releases in a row for one cause; only its own encargos, of its own organization, in the period. |
TestRacha |
func | A delivery ends a run of releases; fewer than three are no warning; a person's stop and a restart neither make nor end one. |
TestClassifyCause |
func | The notes from before the cause was recorded are read by their words, in Spanish and English (invented examples, like the coding agent's own). |
TestGiveBackEncargoCause |
func | The coding agent's give-back keeps its cause; one it does not know is left to the note. |
internal/store/diagnoses_test.go¶
84 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestDiagnoses |
func | Failed runs are diagnosed when the organization has automatic diagnosis on; one asked for is, either way; the last good commit is the branch's last successful run before. |
internal/store/dormir_test.go¶
116 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestDormirStore |
func | The sleep's row starts awake and keeps what is saved; the webhooks kept while asleep come back in the order they came; a run cut by sleep goes back to the queue from its first step, not failed; and the lookout leaves out the log lines of the hours it slept. |
internal/store/encargos_rama_test.go¶
33 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestRamaDeEncargo |
func | |
TestEncargoOfBranch |
func |
internal/store/encargos_test.go¶
265 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestEncargos |
func | An encargo goes pending → taken → waiting → taken → delivered → returned → taken → delivered → reviewed; only one agent has it, and every step is in its history. |
TestEncargoEstimate |
func | The estimator's answer keeps the route it implies, unless a person chose one already; an estimated encargo is not listed to estimate again, and only a pending one can be routed. |
TestEncargosForTheCoder |
func | The coding agent gets the encargos a person sent it first, then (in auto) the easy ones; giving one back leaves it for the person's own agent. |
TestEncargosOfTheSystem |
func | In system mode the coding agent takes by itself the cheap encargos about a run (rendimiento opens them), not the ones a person wrote; and its record counts what it took, delivered at the first try and gave back. |
internal/store/enseco_test.go¶
120 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestRunDry |
func | A run keeps what it checked en seco: the release, each check and its log, and whether one failed; the published release skips one a pre-deploy task blocked. |
TestRunDryCopy |
func | A run keeps what it checked en seco against a copy of the branch: which copy, its address until it is deleted, each check and its log; a check that failed there keeps the run from being merged by itself, also when nothing ran against the published release. |
internal/store/events_test.go¶
56 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestEventsWire |
func |
internal/store/forjas_test.go¶
81 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestForjas |
func | An app is GitHub's unless it says otherwise; a GitLab is kept once per address (connecting it again keeps its id); an account is linked to one person only. |
internal/store/fusion_test.go¶
35 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestSetRunMergeAcceptsEveryState |
func | Every state the platform records for a run's pull request is one the database accepts (the check once lacked "resolved"), and a merged run stays merged. |
internal/store/libreta_test.go¶
218 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestLibretaQueries |
func | What a libreta reads: an app's to-dos and decisions (not its notes, not another app's, not the archived ones), the branches each is worked on, and every encargo about the app with why it was cancelled. |
TestLibretaLinksAndKeeps |
func | What links a branch to entries by itself (a commit's «Ruta: N», and an agent's run in its cargo), and what the libreta keeps of a branch: its merge and the release that carried it. |
internal/store/llaves_test.go¶
32 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestLlaves |
func | A key changed twice keeps one row: the last change, who made it and its expiry, with its version up by one each time. |
internal/store/logarchive_test.go¶
46 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestLogArchiveBookkeeping |
func |
internal/store/opiniones_test.go¶
125 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestOpiniones |
func | A comment is kept with its email apart, and the limits hold: three an hour from one sender, whoever else writes. |
TestClasificarOpiniones |
func | The AI's classification is kept once, and a comment classified leaves the queue for the classifier and joins those a new one may group with. |
TestResponderOpiniones |
func | A person changes a comment, answers it once, and its email goes 30 days after the answer, or at once when it is set aside. |
internal/store/orgs_test.go¶
51 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestMembers |
func | ALLOWED_USERS seeds the first administrators once; members are then managed, and an organization never loses its last administrator. |
internal/store/platicas_test.go¶
132 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPlaticas |
func | A conversation is kept with its entry, one per entry: its messages signed and in order, what its AI cost added up, who answers it, its idea and who wrote it, its cap (and what people allowed past it), one AI turn at a time, and the ones that wait for a person's own agent. |
internal/store/preguntas_test.go¶
157 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestEncargoQuestions |
func | The coding agent asks about an encargo (Ruta 178): it is asking, with its question on the encargo, until a person answers (back to the agent's queue, the answer kept once for it to resume with) or passes it to their own agent; one nobody answered in AskWait is found to pass. |
TestWhatTheCoderSees |
func | The coding agent's views of one app: its slow requests in the Registro (the platform's own lines only for the platform's app), and the lookout's findings about it, never another app's. |
internal/store/puestos_test.go¶
47 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestPuestos |
func |
internal/store/queuelock_test.go¶
41 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestLockQueueHasOneOwner |
func |
internal/store/registro_test.go¶
71 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestLogLines |
func |
internal/store/ruta_test.go¶
100 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestRuta |
func |
internal/store/secretos_test.go¶
35 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestSecretos |
func | Sealed secrets are kept by name, replaced in place and removed. |
internal/store/stats_test.go¶
208 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestDeliveryAndPublicStats |
func | |
TestProblems |
func | Repeats fold into one problem with a count; dismissing hides it until it happens again; old ones are pruned. |
TestResolveProblems |
func | A fix resolves matching problems (by message, app and attribute); a resolved problem is not open, and reopens if it happens again. |
TestResolveQuietProblems |
func | A problem of work retried by itself is resolved once it has been quiet; one that happened since, or another kind, stays open. |
internal/store/store_test.go¶
540 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestAppsRunsReleases |
func | |
TestConcurrentClaimsAndReleaseNumbers |
func | |
TestClaimSkipsAppsWithARunGoing |
func | |
TestClaimBranchesBesideADeploy |
func | |
TestSessionsAndLogCap |
func | |
TestRequeueOrphansRetriesThenGivesUp |
func | |
TestFinishAndCancelCloseSteps |
func | |
TestAddons |
func | |
TestCapacity |
func | The capacity is empty until set, and kept as set. |
TestActivity |
func | Activity shows what happened after a cursor: a run that started and ended, an encargo's moves; and not again from the next cursor. |
internal/store/traces_test.go¶
54 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestTraces |
func | Traces are kept in day partitions: saved, listed by service, read back with their spans, and gone once their day is dropped. |
internal/store/uptime_test.go¶
122 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestUptime |
func |
internal/store/uso_test.go¶
96 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestUsoAggregates |
func | Use is kept as totals per day: views, moves and actions add up, times fall in their bucket, a time out of bounds counts the view but not the time, and old days are deleted. |
TestUsoSwitch |
func | The switch is on until an administrator turns it off. |
internal/store/vigia_test.go¶
160 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestVigiaWeek |
func | The lookout's week adds up in SQL: a step's runs, times and whether it was the last of its run; an app's runs; the log's warnings by message; slow routes. |
internal/testenv¶
Package testenv is the envtest (a real API server and etcd) the controller and platform tests run against, tuned for slow machines.
internal/testenv/testenv.go¶
40 lines
| Name | Kind | Summary |
|---|---|---|
New |
func | New is an envtest with the CRDs in crdDirs. |
internal/traces¶
Package traces keeps whole requests for the Universe's waterfall.
internal/traces/receiver.go¶
165 lines
| Name | Kind | Summary |
|---|---|---|
(*Keeper) Handler |
method | Handler serves OTLP/HTTP (protobuf, optionally gzip) on POST /v1/traces, as the Collector's otlphttp exporter sends it, and /healthz. |
Spans |
func | Spans turns an OTLP export into the store's spans; the service is the resource's service.name (app/service for rendimiento's apps). |
kind |
func | |
attributes |
func | |
value |
func | |
cut |
func |
internal/traces/traces.go¶
275 lines
| Name | Kind | Summary |
|---|---|---|
Store |
interface | Store is where kept requests go (the platform's store). |
Keeper |
struct | Keeper buffers spans by request and decides which requests to keep. |
pending |
struct | |
decision |
struct | |
(*Keeper) Add |
method | Add takes spans as they arrive (from the receiver). |
(*Keeper) pendingOf |
method | |
(*Keeper) Run |
method | Run decides and saves every few seconds, and keeps the day partitions, until ctx ends. |
(*Keeper) partitions |
method | partitions creates the days around now and drops the expired ones. |
(*Keeper) Flush |
method | Flush decides the requests that have waited long enough (or the oldest, when too many wait) and saves the kept ones. |
(*Keeper) decide |
method | decide summarizes a request and says whether to keep it: always when it failed or was slow, otherwise for the sampled share (by its ID, so every span of it gets the same answer). |
health |
func | health says whether a request is a health check, by its root span's route or name ("GET /api/health"). |
sampled |
func | sampled says whether a request falls in the sampled share, by the low bits of its (random) ID. |
internal/traces/traces_test.go¶
181 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestKeeper |
func | Failed and slow requests are kept whole, normal ones by sample, and a span arriving after its request was kept joins it. |
TestHealthChecks |
func | Health checks are not sampled, but still kept when they fail or are slow. |
TestSampled |
func | |
TestReceiver |
func | The Collector's export (protobuf, gzip) becomes spans with the resource's service name, kinds, status and attributes. |
internal/universe¶
Package universe is the view of every app from above: the services each one runs, the databases and caches they use, what calls what, and what the internet reaches.
internal/universe/metrics.go¶
407 lines
| Name | Kind | Summary |
|---|---|---|
EdgeMetrics |
struct | EdgeMetrics are the numbers on one line of the map, measured from traces over the chosen window: how often the caller calls, how many calls fail, and how long they take. |
Metrics |
struct | Metrics reads the service graph the OpenTelemetry collector's servicegraph connector writes to a Prometheus-compatible store (VictoriaMetrics): one series per caller and callee. |
(*Metrics) Edges |
method | Edges returns the numbers of every caller → callee pair seen in the window, keyed by the collector's client and server labels. |
(*Metrics) trends |
method | trends fills the trend of every pair in out from range queries: calls per minute and, as for the totals, the larger latency of the two sides. |
SpanMetrics |
struct | SpanMetrics are the numbers of one kind of span of a service over the window, from the collector's spanmetrics connector: a route it serves (server), a moment of its own (internal: what the observa libraries' tramo records, or the agent's own work), or a call it makes (client). |
(*Metrics) Spans |
method | Spans returns the numbers of every span of service (as observe names it: app/service) seen in the window, the busiest first. |
(*Metrics) spanTrends |
method | spanTrends fills the trends of the spans in out. |
spanKind |
func | spanKind turns SPAN_KIND_SERVER into server. |
sample |
struct | sample is one series of an instant query. |
(*Metrics) query |
method | query runs an instant PromQL query and returns its series, skipping values that are not numbers (NaN from an empty histogram). |
series |
struct | series is one series of a range query. |
point |
struct | |
(*Metrics) queryRange |
method | queryRange runs a PromQL range query, skipping values that are not numbers. |
(*Metrics) get |
method | get fetches a path of the metrics API and decodes its JSON into body. |
promDuration |
func | promDuration writes a window the way PromQL reads it (15m, 1h, 24h). |
internal/universe/universe.go¶
603 lines
| Name | Kind | Summary |
|---|---|---|
Universe |
struct | Universe is every system, its nodes and the edges between them, and the barrios the systems are grouped in. |
System |
struct | System is a group of nodes: one app, one add-on, or one namespace. |
Barrio |
struct | Barrio is a group of systems on the map, so a cluster with many apps can be seen a group at a time. |
Node |
struct | Node is a service, a database or cache, a workload that only calls others (a cron job), or the internet. |
Health |
struct | Health is the latest uptime checks of a service. |
Edge |
struct | Edge is one node calling another. |
Input |
struct | Input is what the universe is made from. |
Build |
func | Build joins the apps, the catalog and the uptime checks into one graph. |
barrios |
func | barrios puts every system in a barrio: the one its app declares; else, for an app that calls other apps or is called by them, the barrio of the apps it talks to most (label propagation, weighted by calls per minute where traces measured them); else the centre. |
(*builder) traced |
method | traced adds the numbers measured from traces to the edges they belong to, and the calls only traces know about (to a service nobody declared, or outside the cluster) as edges of their own. |
(*builder) resolve |
method | resolve finds the node a collector name stands for: "app/service" (what observe names services), "user" (a call from outside, the internet), a cluster address (api.wellness.svc.cluster.local:8000, api.wellness), a short name in the caller's system (api:8000), or a database the caller's app runs (postgresql, redis). |
systemKind |
func | systemKind is the kind of system a catalog entry belongs to. |
builder |
struct | builder collects nodes, systems and edges by ID while the graph is made. |
(*builder) system |
method | system adds s, keeping the first one seen for an ID (apps come first, so an app's system keeps its kind and repo). |
(*builder) node |
method | node is the node with id, added in system when new. |
(*builder) edge |
method | edge records from calling to, merging what each source says about it. |
(*builder) edgesFrom |
method | edgesFrom lists the edges leaving id. |
(*builder) dropLoneInfrastructure |
method | dropLoneInfrastructure removes cluster plumbing nobody outside it calls: ingress controllers, cert-manager and the like are noise on the map unless an app depends on them. |
(*builder) health |
method | health attaches each service's latest uptime checks: up when every latest check passed. |
contains |
func | contains reports whether list has s. |
internal/universe/metrics_test.go¶
181 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestMetricsEdges |
func | |
TestBuildTraced |
func | |
TestMetricsSpans |
func |
internal/universe/universe_test.go¶
165 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestBuild |
func | |
TestBuildWithoutCatalog |
func | |
TestBarrios |
func |
internal/uptime¶
Package uptime checks every app's services once a minute and keeps the results: whether each answered, how fast, and when it was down.
internal/uptime/uptime.go¶
546 lines
| Name | Kind | Summary |
|---|---|---|
Target |
struct | Target is one check: a URL to GET, or a host:port to connect to. |
Targets |
func | Targets lists the checks for a set of apps. |
Checker |
struct | Checker runs single checks. |
NewChecker |
func | NewChecker returns a Checker that does not follow redirects (a redirect, say to a login page, means the service answered) and gives each check timeout to complete. |
(*Checker) Check |
method | Check runs one check. |
shortError |
func | shortError keeps the useful end of an error (Go wraps URLs and addresses around the cause). |
Recorder |
interface | Recorder is what the prober stores results in (the store in production). |
Prober |
struct | Prober checks every target once per Interval and records the results. |
checkState |
struct | |
change |
struct | change is an outage that started or ended, for the round's emails. |
key |
func | key identifies one check: app, service and kind (public or internal). |
(*Prober) Run |
method | Run checks until ctx is done. |
(*Prober) Round |
method | Round checks every target once, records the results and updates outages. |
(*Prober) loadAnswered |
method | loadAnswered learns which checks have ever succeeded, so a restart does not treat a long-working domain as new. |
(*Prober) markDNSPending |
method | markDNSPending rewrites the error of a public check that has never answered and fails its DNS lookup, for its first DNSGrace: a new domain whose record is still spreading. |
(*Prober) notifyChanges |
method | notifyChanges sends one email per app for the outages that started, and one for those that ended, this round. |
checkName |
func | checkName is a check as emails and pages name it. |
joinAnd |
func | joinAnd lists names as "a and b and c", one translatable pair at a time. |
outageMessage |
func | outageMessage is the email that says an app's checks went down, since when and what they answered. |
recoveryMessage |
func | recoveryMessage is the email that says the checks are back, and how long they were down. |
humanDuration |
func | humanDuration is a duration in words ("under a minute", "12 min", "2 h 5 min"). |
(*Prober) observe |
method | observe updates a target's streak, its metrics, and opens or closes its outage. |
Register |
func | Register adds the uptime metrics to a Prometheus registry (the controller-runtime one, served on METRICS_ADDR). |
internal/uptime/uptime_test.go¶
310 lines · tests
| Name | Kind | Summary |
|---|---|---|
TestTargets |
func | |
TestCheck |
func | |
TestIncidents |
func | |
TestRound |
func | |
TestDNSPending |
func | A new domain whose DNS record is still spreading is "DNS pending" for an hour, not an outage; one that has answered before is down at once. |
TestNotifyAfter |
func | Like Alertmanager's "for": an outage is emailed once it has lasted NotifyAfter; a shorter one (the router's nightly restart) is recorded but sends neither the outage nor the recovery email. |
templates¶
Package templates embeds the Dockerfile templates used for repos that do not ship one.
templates/embed.go¶
7 lines
web¶
Package web embeds the built UI (npm run build → web/dist).
web/embed.go¶
22 lines
| Name | Kind | Summary |
|---|---|---|
Dist |
func | Dist returns the built UI, or nil when the binary was built without it. |
Web UI (TypeScript / React)¶
web/e2e/arreglos.spec.ts¶
82 lines
| Name | Kind | Summary |
|---|---|---|
hace |
const | A failed run of a branch whose log says the lockfile is stale: the run page offers the app's declared fix, which regenerates it (here the fix executor is the browser's own: the test server runs no pods), or a branch that declares one. |
ejecucion |
const | |
app |
const | |
sinDeclarar |
const | |
abrir |
function |
web/e2e/boleta.spec.ts¶
53 lines
| Name | Kind | Summary |
|---|---|---|
hace |
const | The AI page with the coding agent's record (Ruta 77): what it took and what became of it, the factor the estimator learned, each encargo's bar of estimate against spent, the new mode, and the switch back to the fixed table. |
hecho |
const | |
vista |
const |
web/e2e/cuentas-agente.spec.ts¶
62 lines
| Name | Kind | Summary |
|---|---|---|
hace |
const | «How the coding agent is doing» on the AI page (Ruta 178): over a period, what it finished and gave back, why, what the person answered, spent against the estimate and the estimator's factor, and the warning of three releases in a row for one cause. |
vista |
const | |
cuentas |
const |
web/e2e/entrar.spec.ts¶
46 lines
web/e2e/errores.spec.ts¶
33 lines
web/e2e/hallazgos.spec.ts¶
67 lines
web/e2e/nueva-app.spec.ts¶
51 lines
web/e2e/paginas.spec.ts¶
276 lines
web/e2e/pasos.spec.ts¶
134 lines
| Name | Kind | Summary |
|---|---|---|
hace |
const | |
paso |
const | |
ejecucion |
const | |
abrir |
function |
web/e2e/pedidos.spec.ts¶
47 lines
web/e2e/playwright.config.ts¶
30 lines
web/e2e/portada.spec.ts¶
241 lines
| Name | Kind | Summary |
|---|---|---|
hace |
const | |
orden |
const | The sections of the Customize panel, in its order. |
deNuevo |
const | Reloads without what this browser kept: what shows is the server's. |
web/e2e/pregunta.spec.ts¶
50 lines
web/e2e/registro.spec.ts¶
36 lines
web/e2e/ruta.spec.ts¶
72 lines
web/e2e/sin-conexion.spec.ts¶
99 lines
web/e2e/sin-pruebas.spec.ts¶
27 lines
| Name | Kind | Summary |
|---|---|---|
hace |
const | |
ejecucion |
const |
web/e2e/tablero.spec.ts¶
130 lines
web/e2e/uso.spec.ts¶
34 lines
web/e2e/vecinas.spec.ts¶
145 lines
web/e2e/vigia.ts¶
33 lines
| Name | Kind | Summary |
|---|---|---|
vigilar |
function | Watches a page the test opened itself (another person's, say). |
web/e2e/vistazo.spec.ts¶
93 lines
| Name | Kind | Summary |
|---|---|---|
hace |
const | |
paso |
const | |
ejecucion |
const | |
unaApp |
function |
web/src/api.ts¶
2551 lines
| Name | Kind | Summary |
|---|---|---|
Size |
type | Typed client for the rendimiento API. |
Need |
type | A need: "postgres", "redis", or another service to call. |
Service |
interface | |
secretNames |
function | Every secret a service reads (envFrom, single keys, or files). |
Job |
interface | |
Spec |
interface | |
FixRun |
interface | One run of a declared fix (store.FixRun): who asked, how it ended, what it wrote. |
StaleLock |
interface | A stale lockfile a failed step's log names (arreglos.Stale). |
FixOffer |
interface | |
FixRecipe |
type | |
Fix |
interface | |
Previews |
interface | A live copy for each pull request, at pr- |
AppTests |
interface | The app's own browser tests, run against each release once live (spec.Tests). |
DryRunOn |
type | |
isLibrary |
function | A library: nothing of it runs or is built to keep, so a run tests it and there is nothing to deploy. |
Task |
interface | A command run as a CI step (mobile builds, smoke tests, release scripts). |
appSecretNames |
function | Every secret an app reads: its services', jobs' and tasks'. |
Detected |
interface | |
Proposal |
interface | |
Step |
interface | |
PullOpened |
interface | A branch's pull request that "Just open the pull request" opened, or found open already. |
Run |
interface | |
DryRun |
interface | |
DryCopy |
interface | |
ServiceStatus |
interface | |
AppStatus |
interface | |
App |
interface | |
TipoPagina |
type | ---- el Mercado (pages made from a form; internal/mercado) ---- |
PaletaPagina |
type | |
TipoEnlace |
type | |
Pagina |
interface | A page as the form fills it (pagina.json). |
Puesto |
interface | A stall of the Mercado: its card and its app's state. |
RutaKind |
type | ---- la Ruta (what people and agents know; agents reach it over /mcp) ---- |
RutaEntry |
interface | |
RutaInput |
interface | |
PlaticaIAId |
type | ---- platicar una entrada: a conversation about a Ruta entry (api.PlaticaView) ---- Who answers a conversation: one of the AI page's providers, or the person's own agent over MCP. |
PlaticaIA |
interface | One AI a conversation may choose, with its model and about what a message costs. |
PlaticaMensaje |
interface | One message, signed: a person's login, the AI's model, or the agent key's name. |
Platica |
interface | |
PlaticaView |
interface | |
PropuestaEncargo |
interface | A proposed encargo, priced as the estimator prices it. |
PropuestaView |
interface | |
PlaticaEncargosInput |
interface | |
PlaticaEncargosView |
interface | |
Cargo |
interface | |
AgentAction |
interface | |
AgentRole |
type | |
MemberRole |
type | A person's role in the organization (internal/store.Member*). |
Org |
interface | An organization (internal/store.Org), with the person's role in it. |
Me |
interface | Who is signed in (api.Me): their role in the organization they work in, and whether they run the platform (its operators see the cluster's pages). |
ClaseOpinion |
type | A comment someone wrote to the team (internal/store.Opinion), as the team's page shows it. |
EstadoOpinion |
type | |
Opinion |
interface | |
AlEquipo |
interface | Writing to the team from this installation (decision 145): whether comments may go, exactly what goes, and the person's own. |
OpinionDetalle |
interface | |
DemoLink |
interface | A demo link (internal/store.DemoLink): a secret address that opens a read-only session in the organization. |
BitacoraRow |
interface | The signed-in person, set once when the app loads (switching organization reloads the page). |
Aprobacion |
interface | A change to production an agent asked for, and what a person decided (internal/store/aprobaciones.go). |
Senal |
interface | One señal de vida, exactly as it is sent (internal/senales.Senal). |
PaginaUso |
interface | A page's totals over the period (internal/store.PaginaUso): cubetas count the measured views under 0.5, 1, 2 and 4 s, and 4 s or more. |
UsoView |
interface | The Use page (api.UsoView): the switch and the totals of the last days. |
SenalesView |
interface | What the operators see of the señales (api.SenalesView), and where they are received, what they say. |
Instalacion |
interface | An installation whose señales came here (rendimiento.ai): when it was first and last heard of, and its last señal. |
BitacoraCheck |
interface | Whether an organization's bitácora chain holds, and where it broke if not. |
session |
const | |
AIProvider |
type | The AI gateway (internal/ia, api.IAView). |
AISettings |
interface | |
Diagnosis |
interface | The diagnostician agent's explanation of a failed run (internal/store.Diagnosis). |
AIUsage |
interface | |
IAView |
interface | |
Factor |
interface | What the estimator learned from the coding agent (internal/agentes.Learned). |
CoderBoleta |
interface | The coding agent's record (api.CoderBoleta): what it took and what became of it. |
CausaAgente |
type | Why the coding agent gave an encargo back (store.Cause*). |
CuentaCausa |
interface | One cause of its releases: how many, of which encargos, and how many of them were read from the note (approx). |
CuentaRazon |
interface | Spent over estimate (the middle) of what it finished of difficulty from to to (0 and 0: all). |
CuentasView |
interface | How the coding agent is doing over a period (api.CuentasView, GET /api/ia/cuentas). |
IAAnswer |
interface | |
IAOrgs |
interface | |
dollars |
const | Millionths of a dollar as dollars: $0.15. |
Member |
interface | |
AppAccess |
interface | Who enters an app: without a list, everyone in the organization with their role; with one, the people on it. |
EncargoStatus |
type | |
EncargoPregunta |
interface | What the coding agent asks the person about an encargo while it is asking (internal/store.EncargoPregunta). |
AutoEncargo |
type | When an encargo opens by itself for an explained failure. |
CodeAgent |
type | What the platform's coding agent does: nothing, only the encargos a person sends it, also the cheap ones about a run (which rendimiento opens), or every cheap one on its own. |
Comentario |
interface | Work asked of agents (internal/store.Encargo). |
Encargo |
interface | |
UnconfirmedManual |
interface | A known failure the diagnostician wrote that nobody rated yet, with the run to rate it on. |
Portada |
interface | The Ruta's front page (api.Portada): what needs the person, and what goes on meanwhile. |
Cola |
interface | The coding agent's queue (api.Cola). |
hoy |
const | When the person's day began, for "today" (the server's otherwise is the last 24 hours). |
AgentKey |
interface | |
CreatedAgentKey |
interface | |
Problem |
interface | ---- problems (the platform's own warnings and errors) ---- |
ProblemList |
interface | |
LogLine |
interface | ---- the platform's log (the Log page, internal/store/registro.go) ---- One line the platform's processes logged at INFO or above, its secrets removed. |
LogPage |
interface | A page of the log, newest first; next is the cursor of the older page. |
LogFilter |
interface | |
EstadoHallazgo |
type | ---- the lookout (el vigía, internal/api/vigia.go) ---- What a person decided of a finding: nothing yet, an encargo, a Ruta entry, or set aside. |
Hallazgo |
interface | One thing the lookout saw, with its evidence. |
RevisionVigia |
interface | One review of a week by the lookout. |
VigiaView |
interface | |
DeliveryStats |
interface | ---- delivery (the dashboard's DORA numbers) ---- |
DeliveryWeek |
interface | |
DeliveryReport |
interface | |
VisitRange |
type | ---- visits (Umami) ---- |
VisitStats |
interface | |
VisitPoint |
interface | |
VisitMetric |
interface | |
VisitReport |
interface | |
VisitSession |
interface | |
VisitStep |
interface | One thing a visitor did: a page they saw, or an event. |
Visits |
interface | |
VisitsSummary |
interface | |
ReliabilityRange |
type | ---- reliability (uptime checks) ---- |
CheckKind |
type | |
UptimeBucket |
interface | |
Probe |
interface | |
UptimeSeries |
interface | |
Incident |
interface | |
Reliability |
interface | |
Release |
interface | |
ReleaseTest |
interface | One of the app's own tests in a release (store.ReleaseTest): its result, and what it may do now. |
ReleaseTask |
interface | A post-deploy task of a release: a command run against it once live. |
VerifyStatus |
type | What release verification concluded ("" for releases from before it existed). |
ResourceNode |
interface | |
Installation |
interface | |
OrgInstallation |
interface | An installation given to an organization other than the platform's (store.OrgInstallation). |
Repo |
interface | |
request |
function | |
LibretaStatus |
type | ---- the libreta: what was asked for an app and whether it is done (libreta.Libreta) ---- A line's state, computed by rendimiento (libreta.*): never set by hand. |
LibretaItem |
interface | One line of an app's libreta: a Ruta entry, an encargo, a pull request of Renovate's, or the app's own tests. |
Libreta |
interface | |
CaminosRun |
interface | ---- caminos: an app's branches as roads (the Caminos tab) ---- One run, as a stop on the road. |
CaminosBranch |
interface | One branch: a vereda that leaves the default branch and, if merged, comes back. |
Caminos |
interface | The last two weeks of an app: its default branch and the branches around it. |
BranchKind |
type | ---- kinds of branch (the Runs tab) ---- What a branch is: the default branch, a fix, a feature, a release, dependency updates, or another. |
BranchKinds |
interface | The kind of each branch of an app's last runs, and its pull request; github is false when GitHub did not answer. |
MesaGroup |
type | Who a line of the work board waits for (mesa.Group*). |
MesaLine |
interface | A line of an app's work board (mesa.Line): a branch with its pull request, its last run and its encargos. |
Mesa |
interface | An app's work board; github is false when GitHub did not answer. |
DaySummary |
interface | One day of the home page's summary (api.SummaryView): its lines, each about an app ("" for the organization). |
AppDay |
interface | One app's numbers of a day (store.AppDay); hours are [passed, failed] runs by the hour they started. |
DayCard |
interface | The day's lotería card (marcador.Card): the most notable thing of the day. |
DayBoard |
interface | A day's scoreboard (marcador.Board): the totals and hours are sums of apps. |
SummaryView |
interface | |
SeccionInicio |
interface | A section of the home page and whether it shows (store.SeccionInicio); a list of them, in order, is a person's home. |
InicioView |
interface | The signed-in person's home page (api.InicioView). |
api |
const | |
subscribe |
function | |
RunNow |
type | A run with its app's name: going on (with its steps), or one of the last that ended. |
Corriendo |
interface | What goes on in the organization's apps (GET /api/corriendo): the Apps page's "Running now" and the search's runs. |
PublicActivity |
interface | The welcome page's "right now": runs going on and the latest releases, by app name only. |
timeAgo |
function | How long ago a time was: "12s ago", "5m ago", "3h ago", "2d ago". |
duration |
function | How long something took (until now if it has not ended): "45s" or "3m 12s". |
EnvStatus |
type | ---- environment ---- |
EnvCheck |
interface | |
EnvProvider |
interface | |
EnvNode |
interface | |
Capacity |
interface | How much the platform runs at once, set on the Environment page (0: the environment variable's value). |
CapacityView |
interface | |
LocalModelView |
interface | A platform setting that changes live (api.SettingView): the value in force, the ConfigMap's, and the one saved on this page, which wins. |
LocalProbe |
interface | What an Ollama said when asked before connecting it (api.LocalProbe). |
LiveSetting |
interface | |
FixedSetting |
interface | |
SettingsView |
interface | |
BoundaryCheck |
interface | Who calls apps across the boundary (api.BoundaryCheck): a guide, from the workloads' environment, not from traffic. |
EnvProblem |
interface | |
EnvReport |
interface | |
InstallState |
interface | ---- where the apps' code lives (internal/api/forjas.go) ---- The setup page's state (api.installView): this browser's install session, what can be connected, and what is. |
ForjaAcceso |
interface | Who would lose access if a forja's connection went: everyone, and the administrators among them. |
Forja |
type | A forja (a forge) rendimiento works with. |
GitLabConnection |
interface | A GitLab connected on the Environment page (store.GitLabConnection). |
ForjasView |
interface | The Environment page's «Where your code lives» (api.forjaView). |
BitbucketConnection |
interface | A Bitbucket Cloud workspace connected on the Environment page (store.BitbucketConnection). |
BitbucketRepository |
interface | A Bitbucket repository the wizard can make an app of (bitbucket.Repository). |
GitLabProject |
interface | A GitLab project the wizard can make an app of (gitlab.Project). |
Identity |
interface | An account on another forja that is the same person (store.Identity). |
forjasApi |
const | |
envApi |
const | |
Llave |
interface | A key on the Keys and settings page (api.LlaveView): never its value. |
LlavesView |
interface | The Keys and settings page (api.LlavesView). |
AjusteProbado |
interface | A setting tested before it changes (api.AjusteProbadoView): each variable's value in use and the ConfigMap's. |
AjusteResultado |
interface | How a test or a change of a setting went (probados.Resultado). |
LlaveResultado |
interface | How changing a key went (llaves.Resultado): every step tried, and whether it was saved. |
PlatformRelease |
interface | rendimiento's own versions: the images its repository's builds made. |
Published |
interface | Which rendimiento is published (api.Published), for the platform's administrators. |
PlatformVersion |
interface | |
CatalogGroup |
type | ---- services catalog ---- |
CatalogEntry |
interface | |
Catalog |
interface | |
UniverseSystem |
interface | ---- universe ---- Every app from above: systems (apps, add-ons, namespaces), their nodes, and what calls what (see internal/universe). |
UniverseBarrio |
interface | A group of systems on the map: named in rendimiento.yaml (declared), found from what the apps call (auto), the apps that call no other app (centre), or what rendimiento does not deploy (outskirts). |
UniverseNode |
interface | |
UniverseEdge |
interface | |
UniverseBarda |
interface | |
AppBarda |
interface | One app's place in the boundary, for its page (api.AppBarda). |
Universe |
interface | |
UniverseWindow |
type | |
UniverseSpan |
interface | What one observed service does, from its traces (internal/universe.SpanMetrics): the routes it serves, its own moments, the calls it makes. |
KeptTrace |
interface | A request the traces service kept (internal/store.Trace): it failed, was slow, or fell in the sample. |
TraceSpan |
interface | One step of a kept request (internal/store.Span). |
universeApi |
const | |
catalogApi |
const | |
RenovateSettings |
interface | ---- add-ons ---- |
RenovateRepoResult |
interface | |
AddonRun |
interface | |
Addon |
interface | |
AppAddons |
interface | |
addonsApi |
const | |
AddonObjectRef |
interface | ---- installed add-ons (Helm charts / git manifests) ---- |
AddonPreview |
interface | |
AddonSource |
interface | |
AddonPhase |
type | |
InstalledAddon |
interface | |
CatalogField |
interface | |
AddonCatalogEntry |
interface | |
AddonDefinition |
interface | |
installedApi |
const | |
Publicacion |
interface | A publish going on (platform.Publicacion): what Dormir waits for, or cuts. |
ResumenDespertar |
interface | What a wake did (store.Despertar), for the summary after it. |
Sueno |
interface | rendimiento's sleep on a computer (platform.EstadoSueno). |
suenoApi |
const |
web/src/banderas.tsx¶
170 lines
| Name | Kind | Summary |
|---|---|---|
Forma |
type | The flag on the presidencia municipal (the control plane's house in Environment, and the Universe's), chosen by each person on this device. |
tres |
const | |
rayas |
const | |
BANDERAS |
const | |
Trazo |
type | A shape to paint, in pixels of a flag w wide and h high. |
trazos |
function | The flag of code (MX when unknown) as shapes to paint, w by h pixels. |
pintarBandera |
function | Paints code's flag on a canvas, its top left corner at x, y. |
BanderaSVG |
component | code's flag as SVG shapes, at x, y, w by h. |
delNavegador |
function | The country of the browser's language (es-MX → MX), when there is a flag for it. |
banderaActual |
function | The flag this person chose on this device: their choice, else their browser's country, else Mexico's. |
ponerBandera |
function | |
useBandera |
function | The flag chosen now, re-rendering when it changes. |
nombrePais |
function | A country's name in the page's language. |
web/src/components/agente-cuentas.tsx¶
164 lines
| Name | Kind | Summary |
|---|---|---|
causaAgente |
function | Why it gave an encargo back, in words (store.Cause*). |
Encargos |
component | Links to encargos by their number. |
ComoLeVa |
component | |
Cuentas |
component | |
Causa |
component | |
factorHoy |
function | The factor the estimator applies today: the numbers of the record above (agentes.Learned), not computed again. |
web/src/components/ambiente.tsx¶
309 lines
| Name | Kind | Summary |
|---|---|---|
Tema |
type | ---- day / night and movement ---- |
guardar |
function | Remembers a choice in this browser, when it can. |
temaActual |
function | The theme in effect: the one picked, else the device's. |
TemaSwitch |
component | Día / Noche: switches the mode and remembers it in this browser; beside it, the colors (FamiliaSwitch). |
Familia |
interface | ---- the colors: the classic papel picado, or one of six families ---- A family of colors, with its day and its night (the tokens are in styles.css, under data-tema). |
familiaActual |
function | The family in effect: the one picked, else the classic one. |
Muestras |
component | |
FamiliaSwitch |
component | The colors: a button that opens the list of families, each with its swatches for the mode in effect. |
MovimientoSwitch |
component | Movement on / off (the papel picado, the flowers, the candles). |
Techo |
component | Roof tiles and papel picado; at night every fourth flag is a farol. |
Cielo |
component | Stars and the moon behind everything; shown only at night. |
Sistema |
interface | Which rendimiento runs here, as the foot of every page says it. |
sistemas |
const | |
queCorre |
function | "v0.2.1 · Linux arm64 · on a computer": the release (or the commit it was built from), the system and how it runs. |
Guardapolvo |
component | The guardapolvo band at the foot of every page, with which rendimiento runs here. |
FlorEstado |
type | ---- the cempasúchil ---- |
Flor |
component | A cempasúchil: a green bud while the app has never gone live; alive (it breathes); withered (it droops and drops |
LluviaDePetalos |
component | A burst of petals over the page, for a release that just went live. |
web/src/components/aprobaciones.tsx¶
112 lines
| Name | Kind | Summary |
|---|---|---|
Aprobaciones |
component | |
Pedido |
component | |
estados |
const | How a request ended, as a badge. |
Decididas |
component |
web/src/components/avisos.tsx¶
118 lines
| Name | Kind | Summary |
|---|---|---|
Actividad |
interface | Something that just happened in the organization (internal/store.Activity). |
Tono |
type | |
Aviso |
interface | |
aviso |
function | What a notice says, its tone and where it leads; undefined for what is not worth a notice. |
oyentes |
const | |
useHistorial |
function | The notices of this page's life, for the bell; re-renders when one comes. |
dura |
const | How long a notice stays: failures longer, so they are not missed. |
Avisos |
component |
web/src/components/barda.ts¶
10 lines
| Name | Kind | Summary |
|---|---|---|
outsideWhy |
function | Why an app is outside the wall, in words. |
web/src/components/boleta.tsx¶
73 lines
| Name | Kind | Summary |
|---|---|---|
EstimateBar |
component | |
Boleta |
component |
web/src/components/borrador.tsx¶
72 lines
| Name | Kind | Summary |
|---|---|---|
leer |
function | |
llaveDe |
const | |
borradorDe |
function | The draft kept for a box, if any. |
guardarBorrador |
function | Keeps a box's text as its draft (an empty one is dropped); true if it was kept. |
soltarBorrador |
function | Drops a box's draft (it was sent). |
useBorrador |
function | |
BorradorGuardado |
component | "Draft kept on this device", under a box whose text is kept. |
web/src/components/buscador.tsx¶
186 lines
| Name | Kind | Summary |
|---|---|---|
PaginaBuscable |
interface | A page the search can open: its address and its name, in the reader's language. |
Resultado |
interface | |
llano |
const | Lowercase and without accents: "bitacora" finds Bitácora. |
escribiendo |
function | Whether a key press is someone writing (in a box, a list or an editable text). |
Buscador |
component | |
Lupa |
component |
web/src/components/caminos-tab.tsx¶
265 lines
| Name | Kind | Summary |
|---|---|---|
when |
const | |
secs |
const | |
dur |
function | |
STATUS |
const | |
statusOf |
const | |
KIND |
const | |
stepLabel |
const | "platform:test" → "platform: tests". |
CaminosTab |
component | The Caminos tab. |
CaminosView |
component | |
lastAt |
const | |
Panel |
component | |
Summary |
component | |
RunItem |
component | |
BranchPanel |
component | |
RunPanel |
component | |
Tile |
component |
web/src/components/caminos.ts¶
795 lines
| Name | Kind | Summary |
|---|---|---|
CaminosSel |
type | |
PlayState |
type | |
Stop |
interface | A run placed on the map. |
Road |
interface | A branch placed on the map. |
EXTRA |
const | |
Colors |
type | |
rng |
function | |
sec |
const | |
Fx |
interface | |
Hit |
type | |
CaminosHandlers |
interface |
web/src/components/campana.tsx¶
161 lines
| Name | Kind | Summary |
|---|---|---|
Pendiente |
interface | One thing that waits for the person, and where to deal with it. |
Campana |
component |
web/src/components/cargando.tsx¶
28 lines
| Name | Kind | Summary |
|---|---|---|
porRuta |
const | Which skeleton each page has; the first pattern that matches wins. |
Cargando |
component |
web/src/components/cola.tsx¶
291 lines
| Name | Kind | Summary |
|---|---|---|
useCola |
function | The coding agent's queue, refreshed every 10 seconds. |
doingText |
function | What the coding agent does now on an encargo ("tool:what", internal/agentes/codigo.go), in words. |
avance |
const | How far an encargo's spending is: what it spent over what was estimated (the brake is at twice that). |
AgenteTira |
component | The coding agent at a glance, as a link to its queue: what it does, how many wait, and how far it is. |
Pedido |
component | When an encargo was asked, as a date and an age. |
Ahora |
component | One encargo the agent does now: what it does, what it spent, its history and the stop. |
Siguen |
component | What comes next, in order: each with its place, when it was asked, moved with the arrows or by dragging. |
Terminado |
component | What it finished and waits for the person's review: accepting it, or sending it back. |
Devuelto |
component | What it gave back to the person: why (its last note), and leaving it to their own agent or sending it again. |
Agente |
component | «El agente»: the coding agent's queue. |
web/src/components/comentarios.tsx¶
75 lines
| Name | Kind | Summary |
|---|---|---|
porTrabajo |
function | The comments of each cargo or encargo, from one list of the organization's. |
Comentarios |
component |
web/src/components/conexion-aviso.tsx¶
65 lines
| Name | Kind | Summary |
|---|---|---|
useTic |
function | Redraws every few seconds while on, so "3m ago" keeps up. |
AvisoConexion |
component | |
porQueApagado |
const | The why of a switched-off action. |
apagado |
function | |
PorQueApagado |
component | The line beside switched-off actions, shown only without a connection. |
web/src/components/construir.tsx¶
62 lines
| Name | Kind | Summary |
|---|---|---|
puedeConstruir |
function | Whether the person reading may start this app's runs: anyone but a guest (the API asks for a collaborator). |
BuildNow |
component |
web/src/components/cuenta.tsx¶
106 lines
| Name | Kind | Summary |
|---|---|---|
memberRoleLabel |
const | |
OrgSwitch |
component | |
enfocables |
const | |
MenuCuenta |
component |
web/src/components/delivery.tsx¶
249 lines
| Name | Kind | Summary |
|---|---|---|
fmtSec |
function | Seconds as the largest sensible unit. |
fmtWeek |
function | "Week of Oct 6" for a week's first day. |
fmtDay |
function | "Oct 6" for a day. |
Trend |
type | A tile's change against the previous period: what moved, and whether that is good. |
TrendNote |
component | A trend as a note: what moved in a label with the state's color, then against what. |
Tile |
type | |
trend |
function | "↓ 40%, better, vs the previous 30 days": direction in words, never color alone. |
tiles |
function | |
Spark |
component | Twelve weeks as a line; gaps where a week has no data; a dot on the last. |
Days |
component | The deploys of each day of the period as bars, oldest first; a day without any keeps a mark on the baseline. |
DeliveryPanel |
component | The dashboard's delivery health: the numbers of the last 30 days and a chart of twelve weeks. |
web/src/components/dormir.tsx¶
280 lines
| Name | Kind | Summary |
|---|---|---|
oyentes |
const | |
poner |
function | |
mirar |
function | |
useSueno |
function | The sleep as rendimiento says it, looked at every 15 seconds while a page shows it. |
hora |
const | |
Luna |
component | |
BotonDormir |
component | The top bar's button: «Sleep» for an administrator; while asleep it says so, and wakes it. |
publicandose |
function | |
DialogoDormir |
component | B1: when to sleep, and whether to shut down completely. |
AvisoSueno |
component | Under the top bar: asleep since when, what waits, and (for an administrator) «Wake up now»; after a wake, B3. |
web/src/components/encargos.tsx¶
465 lines
| Name | Kind | Summary |
|---|---|---|
statusLabel |
const | |
statusClass |
const | |
eventLabel |
const | |
routeLabel |
const | |
difficultyColor |
const | A difficulty's color, from green (1, cheap) to red (10, expensive), in either theme. |
difficultyWord |
const | A difficulty in words: easy, medium, hard. |
Dificultad |
component | A difficulty as a colored square with its number. |
enFila |
const | Whether the coding agent will take it by itself: in its queue (the queue's page lists them). |
porQueNo |
function | |
useApps |
function | The apps of the organization, for the selects that choose one. |
EscogerApp |
component | Choosing the app of an encargo asked without one, right on its card (or its line on the front page). |
suma |
const | What some encargos would cost: the sum of their estimates. |
BarraMandar |
component | The bar at the bottom while encargos are chosen: how many, about what they would cost, and sending them in one go. |
Confirmar |
component | A choice that waits for a yes on the page itself (never the browser's confirm()): what it does, and yes or no. |
Menu |
component | The «⋯» menu: the rest of what can be done with an encargo. |
EncargoCard |
component | One encargo as a card: who asked, its app and route, how hard, its one main action, comments and the «⋯» menu. |
DevolverForm |
component | Sending a delivered encargo back: what is missing, on the page (the next agent reads it). |
NuevoEncargo |
component | |
Cifras |
component | |
grupos |
const | |
Encargos |
component |
web/src/components/enlace-problemas.tsx¶
17 lines
| Name | Kind | Summary |
|---|---|---|
ProblemsNavLink |
component |
web/src/components/esqueleto.tsx¶
288 lines
| Name | Kind | Summary |
|---|---|---|
Esqueleto |
component | |
Hueso |
component | A bone: a grey block with the sheen. |
Cabeza |
component | A page's title and the line under it, with its buttons on the right when it has them. |
EsqMosaico |
component | (a) A mosaic of cards with its counters row and search above (Apps, with the Today band above them). |
EsqListaDetalle |
component | (b) A list on the left and the detail of the one chosen beside it (Services, Add-ons, Problems, Mercado, Comments). |
EsqCosa |
component | |
EsqPueblo |
component | (d) The Universe: the town in silhouette on its ground, the floating controls where the real ones sit, and the side panel. |
EsqRenglones |
component | A few lines of text, for a small panel whose data is on its way (the Ruta's index). |
EsqTabla |
component | |
EsqBloques |
component | (f) Cards one under the other, of the heights given: an app's tab (Reliability, Visits), a panel whose data is on its way. |
EsqPortada |
component | (g) The Ruta's front page: its rows for the person, one under the other, and the counts of what goes on meanwhile. |
EsqTarjetas |
component | (h) The encargos' cards, while they come: a head line, the title, the difficulty and the actions. |
EsqCola |
component | (i) The coding agent's queue: what it does now, and the line of what follows. |
EsqCuaderno |
component | (j) The notebook: its search and its colored cards. |
web/src/components/falla.tsx¶
346 lines
| Name | Kind | Summary |
|---|---|---|
ClaseFalla |
type | |
contexto |
const | What the frame knows (set by FallaFrontera): the version that answers, the organization the person works in, and the in-app route before this one. |
vinoDe |
function | The in-app route the person came from, if they came from one. |
claseDe |
function | Which full page an error of a page's main load calls for; undefined: a small alert is enough. |
reportarFalla |
function | Reports a page shown, once per kind and page in this load of the UI; true when it was recorded. |
useReporte |
function | Reports the page once, when it shows. |
trazos |
const | |
DibujoFalla |
component | An error page's drawing, in one line, in the accent's color. |
FallaPagina |
component | The frame of the four pages: drawing, title, why, what is known, the ways out, and a small code line. |
Volver |
component | "Back": to the page before, or to Apps when this is the first page of the visit. |
VinoDe |
component | Where the person came from, as a link back. |
distancia |
function | Edit distance between two short strings. |
parecido |
function | The closest of names to a name, if close enough to be a typo (or one inside the other); never the name itself. |
useSugerencia |
function | What the person may have meant: an app with a close name, the app itself when only its run is missing, or a page. |
NoExiste |
component | This page does not exist: an address no route has, or a thing (an app, a run, a request) the API does not have. |
SinPermiso |
component | No access: what the page is about exists, but this account has no entry to it. |
useSegundos |
function | Seconds since a moment, ticking every second. |
NoResponde |
component | |
Falla |
component | |
codigoCorto |
function | A short random code that ties what the person saw to what was recorded. |
cima |
function | The top of a component stack: its first few lines, trimmed. |
FallaAqui |
component | Something failed showing this page: the UI threw while drawing it. |
EstadoFrontera |
type | |
FallaFrontera |
component |
web/src/components/forjas.tsx¶
281 lines
| Name | Kind | Summary |
|---|---|---|
Forjas |
component | The section: one card per forja, and who signs in. |
pierden |
function | The warning's second line: who can no longer sign in once the forja goes (their only account is there). |
GitLabTarjeta |
component | A GitLab connected here: its address, who rendimiento acts as, and its apps. |
ConectarGitLab |
component | Connecting a GitLab: its address and an OAuth application of yours; then GitLab asks you to authorize it. |
BitbucketTarjeta |
component | A Bitbucket workspace connected here: who rendimiento acts as, and its apps. |
ConectarBitbucket |
component | Connecting a Bitbucket Cloud workspace: its name and an OAuth consumer of the workspace; then Bitbucket asks you to authorize it. |
web/src/components/hoy.tsx¶
191 lines
| Name | Kind | Summary |
|---|---|---|
enOrden |
function | The steps in the order they run: by how deep each is in what it waits for, then by name. |
Tarjeta |
component | A card of the band: its title with its count, and what is under it (bones while it loads). |
Huesos |
component | |
Mas |
component | |
loUltimo |
function | What ended last, in words. |
Carril |
component | One run going on: its app, the step at hand and for how long, as a way to the run. |
HoyCorriendo |
component | Running: the runs queued or running, read again every few seconds while there are some, more calmly while all is quiet. |
HoyEsperan |
component | Waiting for you: what each app's work board has on your turn, each a door to that board. |
Ayuda |
interface | An app that needs help, and why: in the order a person would look. |
necesitanAyuda |
function | The apps that need a hand: withered (a check down, or failing workloads), their last release failed, or none of yesterday's runs passed. |
HoyAyuda |
component | Need help: the apps in trouble, each with its reason and a way to it. |
PieDelInicio |
component | The quiet line under the mosaic: the week's visitors (to Numbers), yesterday's releases (opens the scoreboard), the Mercado. |
web/src/components/libreta.tsx¶
316 lines
| Name | Kind | Summary |
|---|---|---|
ESTADO |
const | Each state's words and colour; the order is the one a request goes through. |
abierto |
const | |
hecho |
const | |
reciente |
const | |
day |
const | |
Filtro |
type | |
LibretaTab |
component | The Libreta tab. |
Anotar |
component | Writing a request: a to-do in the Ruta, about this app. |
Origen |
component | Where a line comes from, as a link: its Ruta entry, its encargo or its pull request. |
porque |
function | What a line's state means, in words. |
paso |
const | Where a line is on the way: 0 asked, 1 on its branch, 2 merged, 3 shipped. |
Descartar |
component | «Discard» on an open Ruta line: the reason is asked for here, in the card, and kept in the Ruta. |
Retomar |
component | «Take it up again» on a discarded Ruta line. |
Abierto |
component | An open line: its title and state, who asked, its way so far, and its links. |
Hecho |
component | A done line: its title, and the merge and the release it went out in. |
web/src/components/lo-ultimo.tsx¶
79 lines
| Name | Kind | Summary |
|---|---|---|
Rama |
component | A branch's name as a link to it on its forja (GitHub, GitLab or Bitbucket), where its files, its commits and its change are. |
verifyBadge |
const | |
VerifyBadge |
component | What release verification concluded, with its message on hover. |
LoUltimo |
component |
web/src/components/maqueta.ts¶
1242 lines
| Name | Kind | Summary |
|---|---|---|
Status |
type | |
NodeKind |
type | |
MapNode |
interface | |
MapPueblo |
interface | |
MapBarrio |
interface | |
MapRoad |
interface | A road between two barrios, pueblos or nodes ("internet" for visitors). |
MapBarda |
interface | |
MapModel |
interface | |
Level |
type | |
HitKind |
type | |
Pick |
interface | |
MapView |
interface | |
Engine |
interface | What the page asks of a maqueta, in 2.5D or in 3D. |
RANK |
const | |
worst |
const | |
rate |
function | Calls per minute, short: "12/min", "1.2k/min". |
ms |
const | |
still |
const | True when the page should hold still (the switch in the top bar, or the device setting). |
isNight |
function | True at night: chosen in the top bar, or following a dark device. |
DAY |
const | The village's own colors, by day and by night; the rest comes from the page's tokens. |
NIGHT |
const | |
Palette |
type | |
P |
interface | |
Box |
interface | |
Cam |
interface | |
Road3 |
interface | |
Decor |
interface | |
PlacedBarrio |
interface | |
PlacedPueblo |
interface | |
Inside |
interface | |
Hit |
type | |
Label |
interface | |
iso |
const | |
clamp |
const | |
hash |
function | |
qpt |
const | |
roadGeom |
function | |
roadWidth |
const | |
INTERNET_AT |
const | |
hexOf |
function | A CSS color as #rrggbb (#rgb, #rrggbb, #rrggbbaa or rgb()); undefined when it is not one of those. |
mixHex |
function | a, moved k of the way to b (two #rrggbb colors). |
Town |
type | |
townOf |
function | |
palette |
function | The village's colors for day or night, with the page's own tokens; with a family of colors chosen, its town too. |
placeWorld |
function | Where every barrio and pueblo goes, in tiles; both the 2.5D and the 3D maqueta use it. |
Spot |
type | |
WallSide |
interface | One side of the wall: whether it is behind the barrios (drawn first), and its pieces between gaps (x0, y0, x1, y1). |
WallPlan |
interface | |
wallPlan |
function | |
wallAround |
function | |
placeInside |
function | Inside a pueblo: its houses in a ring around the plaza, the arch, and one signpost per app called. |
drawLabels |
function | Draws labels in screen space, the most important first, skipping any that would cover another. |
paseo |
function | Where the people walking round the plaza are at a time (seconds): half go one way, half the other, as in the old paseo. |
shade |
function | Lightens (k > 0) or darkens (k < 0) a #rrggbb color. |
badge |
function | The letters on a house: its language, like the Services page. |
distSeg |
function | |
inPoly |
function |
web/src/components/maqueta3d.ts¶
991 lines
| Name | Kind | Summary |
|---|---|---|
Anchor |
interface | |
Flow |
interface | |
Proxy |
interface | |
RoadHit |
interface | |
Badge |
interface | |
Pose |
interface | |
mix |
function | Mixes two #rrggbb colors. |
distSeg |
function |
web/src/components/marca.tsx¶
53 lines
| Name | Kind | Summary |
|---|---|---|
Logo |
component | rendimiento's mark: the sun over the furrows, the worked field (it sways a little when the pointer is on it). |
Semilla |
component | The seed that sprouts: the icon of the button that makes a new app (it sprouts on hover and focus). |
LangSwitch |
component | EN/ES: shows the other language, in that language. |
BanderaSwitch |
component |
web/src/components/mesa.tsx¶
187 lines
| Name | Kind | Summary |
|---|---|---|
MesaTab |
component | |
Pedir |
component | |
Fila |
component | |
porque |
function | What a line's state means, in words. |
accion |
function | The one thing to do about a line, as a link. |
Cerrar |
component | |
MesaAviso |
component | On the home page: how many things wait for the person, per app, each a door to that app's board. |
web/src/components/navegacion.tsx¶
149 lines
| Name | Kind | Summary |
|---|---|---|
f |
const | |
pt |
const | |
olan |
function | A scalloped ring: n petals on a circle of radius r. |
picos |
function | n points around a circle, from r0 out to r1. |
circulo |
const | |
trazos |
const | |
Pagina |
type | |
Dibujo |
component | A page's drawing, in one line, in the text's color. |
useTelefono |
function | Whether the screen is a phone's (the sheet instead of the bar's links). |
Altura |
type | How far the sheet is raised: it peeks, every page, or the account too. |
Hoja |
component | The phone's menu: the sheet at the bottom, with the pages and, raised whole, the account and preferences. |
web/src/components/pasos.tsx¶
273 lines
| Name | Kind | Summary |
|---|---|---|
Tema |
type | |
temaGuardado |
function | |
icono |
const | |
color |
function | A step's color: its own (by its place in the run, the same in both ways), unless its status says more. |
ms |
const | |
lugar |
function | A place: 1st, 2nd… |
nombre |
function | What a screen reader says for a step: its id, status and duration. |
useHolgura |
function | |
previos |
function | How long each step took in an earlier run that passed (ms), and when it finished from that run's start. |
andando |
const | |
Icono |
component | |
Pasos |
component | |
Vista |
type | |
Carrera |
component | |
Hilos |
component |
web/src/components/perezosa.tsx¶
53 lines
| Name | Kind | Summary |
|---|---|---|
faltaArchivo |
function | The import failed because the file did not arrive (not because its code threw). |
recargarUnaVez |
function | Reloads the page, unless it did so a moment ago (sessionStorage may be unavailable: then never by itself). |
NoCargo |
component | |
perezosa |
function | perezosa(() => import("./pages/X").then((m) => m.X)): the page X, loaded when it is first shown. |
web/src/components/personalizar.tsx¶
120 lines
| Name | Kind | Summary |
|---|---|---|
ofrecida |
function | Whether a section is offered to this person: Delivery is the platform's operators'. |
Personalizar |
component |
web/src/components/platica.tsx¶
484 lines
| Name | Kind | Summary |
|---|---|---|
usePlatica |
function | The conversation of an entry, polled: every 4 seconds while it is open (so two people see each other), else every 30. |
iaNombre |
function | An AI of the selector in words: who it is and what a message costs. |
iaCorta |
function | Who answers, short, for the line under the box. |
Leido |
component | What the AI read, in words: «Leí: Ruta 92, 73 y el libro, «AI»». |
Cara |
component | A robot's face, for the AI's and an agent's messages. |
Mensaje |
component | One message, signed: the person's own on the right, the others' on the left with who wrote it. |
Idea |
component | «La idea hasta ahora»: the AI keeps it after each answer; a person may correct it. |
Escribiendo |
component | The three dots while the AI writes. |
EsqPlatica |
component | The conversation's skeleton, while it is on its way. |
Platica |
component | |
Borrador |
interface | One encargo of the proposal, as the person changes it. |
Convertir |
component | |
TopePlatica |
component | On the AI page: what one conversation may spend on paid models before it asks whether to go on. |
web/src/components/portada.tsx¶
272 lines
| Name | Kind | Summary |
|---|---|---|
saludo |
function | The greeting for the hour of the day. |
primera |
const | The first line of a text, short. |
Fila |
component | One thing that needs the person: its sign, what, a line more, and its one action. |
SinQuien |
component | The encargos nobody has: choose which go to the coding agent, or their app when it is missing. |
letra |
const | A letter for an option: A, B, C, D. |
Pregunta |
component | |
Cuenta |
component | A count of what goes on meanwhile, as a link to where it is. |
AgenteLado |
component | The coding agent on a computer's right column: what it does now and what follows. |
ParaUsted |
component | «Para usted»: the Ruta's front page. |
web/src/components/reliability.tsx¶
412 lines
| Name | Kind | Summary |
|---|---|---|
kindLabel |
const | |
fmtPct |
function | A share as a percentage: two decimals near 100% (where they matter), "—" with no data. |
fmtMs |
function | A time in milliseconds as "350 ms" or "1.25 s". |
fmtDuration |
function | An outage's length in words: minutes, hours and minutes, or days. |
BucketState |
type | |
stateLabel |
const | |
stateColor |
const | |
bucketState |
function | A bar of the uptime strip: no data, all good, mostly up, or mostly down. |
timeline |
function | Every bucket of the range, including the ones without checks. |
fmtWhen |
function | A bar's time as the range needs it: the hour for 24 h, the day (and hour for 7 days) otherwise. |
checksOf |
function | |
ReliabilityTab |
component | |
CheckCard |
component | One check: its uptime strip, latency chart, numbers and outages. |
Tile |
component | A number with its label and a note under it. |
Tip |
type | |
TipBox |
component | The tooltip over a chart: when, and each line's value. |
StatusStrip |
component | Was it up? One cell per bucket, in the reserved status colors, with a legend. |
niceMax |
function | A round top for a chart's scale (1, 2, 2.5 or 5 times a power of ten). |
LatencyChart |
component | Response times: p95 and p50 per bucket, release markers, crosshair tooltip. |
DataTable |
component | The same numbers without hovering: the table view. |
Incidents |
component | The outages in the range: which check, when, how long, and the error. |
web/src/components/resumen.tsx¶
282 lines
| Name | Kind | Summary |
|---|---|---|
hiddenOn |
function | The day it was hidden on, so it shows again the next day. |
dayTitle |
function | A day as the reader says it: «Ayer, 12 de noviembre». |
useResumen |
function | The day's summary, read once for the home page (the folded line, the scoreboard and the Need help card share it). |
Resumen |
type | |
ultimoTablero |
function | The newest day with numbers, and its board. |
diaCorto |
function | A day in one word: «Yesterday», or its weekday. |
ResumenDelDia |
component | |
Insignias |
component | The two badges: releases all healthy, and work waiting for a review. |
useSube |
function | A number that counts up to its value when it first shows (still with movement off). |
Cifra |
component | |
PorHora |
component | The runs by hour, passed below and failed on top, with the hours at 0, 6, 12, 18 and 23. |
Anillo |
component | A ring of the share of runs that passed (no ring for an app with no runs that day). |
cartas |
const | |
frase |
function | What a card says on its back. |
Carta |
component | The day's lotería card: the most notable thing of the day. |
Dibujo |
component |
web/src/components/senales.tsx¶
83 lines
| Name | Kind | Summary |
|---|---|---|
Senales |
component |
web/src/components/solo-abrir.tsx¶
52 lines
| Name | Kind | Summary |
|---|---|---|
SoloAbrir |
component |
web/src/components/tejido.ts¶
138 lines
| Name | Kind | Summary |
|---|---|---|
Hebra |
interface | A step as the layout sees it: seconds it has run (so far), or undefined when it has not started. |
Hilo |
interface | A step placed: its thread from (x0, y) to (x1, y); deps are the steps whose threads knot at (x0, y). |
Tejido |
interface | |
niveles |
function | Each step's level: the longest chain of dependsOn (inside the run) before it. |
porNiveles |
function | |
totalSegundos |
function | The seconds the run's scale stands for: the longest thread of every level (so far, or last time), end to end. |
tejer |
function |
web/src/components/texto.tsx¶
77 lines
| Name | Kind | Summary |
|---|---|---|
enLinea |
function | Inline formatting: bold and code; everything else is plain text. |
Bloque |
type | |
bloques |
function | Splits the text into paragraphs, lists and code blocks. |
TextoConFormato |
component | Text written by an agent or a person, with its little Markdown shown as formatting. |
web/src/components/ui.tsx¶
262 lines
| Name | Kind | Summary |
|---|---|---|
Tone |
type | |
phaseTone |
const | |
phaseLabel |
const | The words the API's statuses are shown with. |
statusText |
function | A status word from the API (a phase, a run or step status, a health), in the UI's language. |
PhaseBadge |
component | An app's state as a colored label (its message as the tooltip). |
runTone |
const | |
RunBadge |
component | A run's or step's state as a colored label, pulsing while it runs. |
HealthBadge |
component | A resource's health as a colored label. |
ErrorBox |
component | An error as a red box, or nothing. |
usePoll |
function | Loads data and refreshes it every intervalMs (0 = once). |
ResourceTree |
component | The tree of an app's resources in the cluster, each with its health. |
TreeNode |
component | One resource in the tree, with what is under it. |
stepColors |
const | |
PipelineGraph |
component | |
Switch |
component | An on/off switch (a button with role="switch"). |
CopyButton |
component |
web/src/components/vigia.tsx¶
154 lines
| Name | Kind | Summary |
|---|---|---|
Tarjeta |
component | One finding: what it saw, its evidence, and the person's three choices (two for a fact). |
Vigia |
component | "What the lookout saw": the latest review's findings, on the Log page. |
VigiaIA |
component | On the AI page, for the platform's operators: the lookout's switch, its monthly cap and what it spent. |
web/src/components/visits.tsx¶
398 lines
| Name | Kind | Summary |
|---|---|---|
isoDay |
const | A date as the date input writes it, in the visits' time zone ("2026-10-20"). |
fmtN |
const | |
bounceRate |
function | The share of visits that saw one page and left, or undefined with no visits. |
avgVisit |
function | How long a visit lasts on average, in seconds. |
fmtVisitTime |
function | Seconds as "45 s" or "2 min 5 s". |
change |
function | "↑ 40%, better, vs the period before": direction in words. |
Tile |
component | A number with its label and a note under it (and a tooltip); the note can be a trend. |
niceMax |
function | A round top for a chart's scale (1, 2, 2.5 or 5 times a power of ten). |
VisitChart |
component | Visitors and page views per hour or day, with a crosshair tooltip. |
countryName |
function | A country's name in the reader's language, from its two-letter code. |
Top |
component | A top list: the value, a bar for its share, the count. |
ReportView |
component | |
stayed |
function | How long a visitor stayed, from their first to their last page. |
Sesiones |
component | |
Recorrido |
component | One visitor's way through the site: where they came from, each page, and when they left. |
VisitsTab |
component | The app's Visits tab: Umami's numbers for each of its addresses today, yesterday, on a chosen day, or over 7 or 30 days, with its visitors. |
VisitsPanel |
component |
web/src/components/vistazo.tsx¶
326 lines
| Name | Kind | Summary |
|---|---|---|
Floracion |
type | How an app is, in one word: a bud before its first release, open and breathing when it runs, closing when it is slow or fails now and then, withered when it does not answer. |
Dia |
interface | A day of the week as a dot: how its checks went. |
semana |
function | The week's numbers from the uptime checks: share in line, typical answer time, one dot per day. |
floracion |
function | The flower's state from what the page knows of the app and its week. |
palabra |
const | |
Vistazo |
component | |
barra |
const | A step of a run as a short bar: green when done, amber while it runs, red when it failed, grey before. |
Ahora |
component | |
LeEspera |
component | |
Enlaces |
component | Where the app answers: each service's address (its domain, or on the network at home), without repeats. |
Pasos |
component | |
estadoDia |
const | |
diaCorto |
const | |
diaLargo |
const | |
respuesta |
const | |
tecnicoPrimero |
function | Whether this person asked to see the technical side first (on this device). |
ponerTecnico |
function | |
VolverAlVistazo |
component | On the work board, for whoever chose the technical side first: the way back to the glance. |
Visitas |
component | The week's visits as bars, with how they compare with the week before. |
FlorGrande |
component |
web/src/conexion.ts¶
135 lines
| Name | Kind | Summary |
|---|---|---|
Conexion |
interface | |
oyentes |
const | |
enLinea |
function | |
calcular |
function | |
cambio |
function | |
respuesta |
function | An API answer arrived: from rendimiento (live), or the worker's copy (with the time it was kept). |
falloDeRed |
function | An API call did not reach rendimiento (fetch rejected). |
sospecha |
function | |
probar |
function | Asks rendimiento whether it answers (within ms); true and the notice goes when it does. |
sinConexion |
function | Whether there is no connection now. |
useConexion |
function | The connection, for a component: it draws again when it changes. |
web/src/forja.ts¶
95 lines
| Name | Kind | Summary |
|---|---|---|
forjaOf |
function | The app's forja, GitHub when it says none (every app from before GitLab). |
forjaName |
function | The forja's name, as people write it. |
forjaSello |
function | The forja's two letters, on its seal. |
repoURL |
function | The repository's page. |
branchURL |
function | A branch's page, where its files and commits are. |
pullURL |
function | A change's page: the pull request on GitHub and Bitbucket, the merge request on GitLab. |
newPullURL |
function | Where a person opens the change of a branch. |
pullLabel |
function | A change by its number, in the forja's words: pull request #7, merge request !7. |
pullWord |
function | "pull request" or "merge request", the forja's word for a change. |
ForjaDeEntrada |
interface | A forja a person can sign in with here: GitHub, one GitLab (by its address) or Bitbucket (any of its workspaces). |
forjasDeEntrada |
function | |
loginEn |
function | |
forjaDeLogin |
function | The forja a member's own name signs in with (the server's claveDeLogin): no "@" is GitHub's. |
web/src/i18n.ts¶
62 lines
| Name | Kind | Summary |
|---|---|---|
Lang |
type | |
initial |
function | |
setLang |
function | Switches the language and reloads, so every page renders in it. |
t |
function | The phrase in the current language, with {name} placeholders filled in. |
tn |
function | t() for a count: one when n is 1, else other; {n} is filled in. |
web/src/i18n/es.ts¶
3239 lines
| Name | Kind | Summary |
|---|---|---|
es |
const | Spanish for every phrase in the UI, keyed by its English text (see ../i18n.ts). |
web/src/inicio.ts¶
80 lines
| Name | Kind | Summary |
|---|---|---|
IdSeccion |
type | |
NOMBRES |
const | Each section's name in the Customize panel. |
conocidas |
const | |
completar |
function | The known sections of a list, once each and in its order, with the ones it lacks added as base has them. |
leer |
function | |
recordar |
function | |
useInicio |
function | The person's home page: what this browser kept at once, then the server's. |
web/src/main.tsx¶
246 lines
| Name | Kind | Summary |
|---|---|---|
UsoPage |
const | The first screen (setup, welcome, Apps, the public form) comes with the shell; every other page loads when it is opened. |
Numeros |
const | |
Registro |
const | |
NewApp |
const | |
AppPage |
const | |
RunPage |
const | |
Environment |
const | |
Llaves |
const | |
Services |
const | |
Universe |
const | |
RequestPage |
const | |
Addons |
const | |
Problems |
const | |
Mercado |
const | |
PuestoEditor |
const | |
Ruta |
const | |
Bitacora |
const | |
SenalesPage |
const | |
IA |
const | |
Buzon |
const | |
AlEquipo |
const | |
SignIn |
type | |
Cuentas |
const | |
Members |
const | |
Shell |
component |
web/src/pages/Addons.tsx¶
285 lines
| Name | Kind | Summary |
|---|---|---|
phaseTone |
const | |
Elegido |
type | |
Addons |
component | |
Item |
component | One add-on in the list: its name, its category or state, and a dot for how it is. |
Seccion |
component | A group of the list, with its count; nothing when it is empty. |
RenovateCard |
component | |
RunRow |
component | One Renovate run: when, how long, what it did; open, its log and each repository's result. |
web/src/pages/AlEquipo.tsx¶
99 lines
| Name | Kind | Summary |
|---|---|---|
AlEquipo |
component |
web/src/pages/AppPage.tsx¶
828 lines
| Name | Kind | Summary |
|---|---|---|
AppPage |
component | |
Datos |
component | The four facts under the name, each a door to its tab: the last run, the live release, availability and visits. |
Overview |
component | |
Barda |
component | |
needTitle |
const | |
ProvidedNeeds |
component | The database and cache rendimiento runs because the app's services need them. |
DependencyUpdates |
component | The app's Renovate switch and what the last run did for its repo. |
kindNames |
const | A branch's kind beside its name, when it says something. |
Runs |
component | |
Releases |
component | |
taskBadge |
const | |
PostDeployTask |
component | One post-deploy task under its release: status, duration, and its log on demand. |
VerificationBanner |
component | A banner while the newest release is verified, or after it was rolled back. |
AutoEncargoSetting |
component | |
AutoMergeSetting |
component | |
WhoEnters |
component | |
testStatus |
const | |
testState |
const | |
ReleaseTests |
component | A release's own tests: how each went, and whether it only reports, blocks a release, or is set aside. |
Settings |
component | The Settings tab: who merges, when encargos open for failures, the app's secrets (values set here, never in git) and the danger zone. |
DangerZone |
component | |
SecretForm |
component |
web/src/pages/Bienvenida.tsx¶
405 lines
| Name | Kind | Summary |
|---|---|---|
BookLinks |
interface | |
Monarca |
component | A monarch butterfly, the Ruta's emblem. |
Bando |
component | "Right now in the town": what rendimiento is doing, pinned up as a bando, refreshed every 20 seconds. |
Ilustracion |
component | The drawing beside each sense of "rendir": a flower that grows, a pot of beans, a book of accounts. |
SignInOption |
type | |
entradas |
function | |
Bienvenida |
component | |
EscenaWindows |
component | What the Windows app's assistant does, step by step, until its icon sits next to the clock. |
EscenaTerminal |
component | The one command in a terminal, what it leaves running, and where rendimiento answers. |
Sistema |
type | |
nombres |
const | |
Instalar |
component |
web/src/pages/Bitacora.tsx¶
161 lines
| Name | Kind | Summary |
|---|---|---|
resultado |
function | How an action ended, as a badge: HTTP 2xx and agents' "ok" are fine, 4xx a refusal, the rest a failure. |
acciones |
const | Actions in words; the route or tool stays beside them, small. |
detalle |
function | What the row's detail says, in words: a decision, a comment, an outcome. |
sobre |
function | What an action was on: "app tienda · id 3". |
Bitacora |
component |
web/src/pages/Buzon.tsx¶
250 lines
| Name | Kind | Summary |
|---|---|---|
clases |
const | |
estados |
const | |
Coincidencia |
component | Where a match points: a book page, a Ruta entry, or an earlier comment. |
Buzon |
component | |
Detalle |
component |
web/src/pages/ComentarioPublico.tsx¶
105 lines
| Name | Kind | Summary |
|---|---|---|
ComentarioPublico |
component |
web/src/pages/Cuentas.tsx¶
60 lines
| Name | Kind | Summary |
|---|---|---|
Cuentas |
component | The Your accounts page, from the account menu. |
web/src/pages/Dashboard.tsx¶
265 lines
| Name | Kind | Summary |
|---|---|---|
marchita |
function | An app is withered while one of its checks is in an outage, or its |
Filtro |
type | |
filtros |
const | |
coincide |
function | Whether an app matches what was searched: its name, repository or addresses. |
resaltar |
function | The text with what was searched marked. |
Engrane |
component | The cogwheel of Customize home. |
Dashboard |
component |
web/src/pages/Environment.tsx¶
903 lines
| Name | Kind | Summary |
|---|---|---|
tone |
const | |
label |
const | |
rank |
const | |
StatusBadge |
component | A check's status as a colored label: OK, Attention, Missing or Error. |
peor |
function | The worse of some statuses (ok when there are none). |
diasHasta |
const | Days from now until an instant (negative: it is past). |
venceProximo |
const | A key expires within the 30 days the page warns about (llaves.Aviso). |
Environment |
component | The Environment page: where the apps live and what the platform connects to, or, on one computer, its version and where its settings are. |
EnEstaComputadora |
component | |
PapelPicado |
component | The papel picado hung over the page; it sways a little, and stands still when movement is off. |
Entorno |
component | |
ComoVa |
component | «How it goes»: the sun turns slowly; its face and the words follow the overall status. |
Cifra |
component | One number of the summary, with a colored top. |
Dibujo |
type | |
Icono |
component | An illustration of a service or a requirement: a white drawing on a colored square. |
dibujoDe |
const | How each check is drawn: its illustration and color. |
Necesita |
component | |
TarjetaCheck |
component | A requirement that is not well: what it says, and its action (change its key, open its service, or see how to fix it). |
TarjetaProblema |
component | An unhealthy workload or certificate in the cluster, and how to look at it. |
Casita |
component | |
Barra |
component | A thin bar with its label and percent; "—" without live usage. |
conexionDe |
const | The connection whose card opens for each check (the «See» of what needs you). |
Conexion |
interface | |
Conexiones |
component | |
DynamicDNS |
component | Dynamic DNS: the public IP the records follow, when it last changed, and a button to check it now. |
CheckRow |
component | |
TestEmail |
component | Sends a sample notification now, and says what happened. |
Meter |
component | A bar of how much of something is used (green, then yellow from 75%, red from 90%). |
Capacidad |
component | |
settingHelp |
const | What each live setting does, in a sentence. |
Ajustes |
component | |
AjusteRow |
component | One live setting: its value, where it comes from, and a control to change it or take it back. |
gib |
const | |
cores |
const | |
NodeCard |
component | One node: ready or not, pressure, its CPU and memory in use, and what it runs on. |
web/src/pages/IA.tsx¶
528 lines
| Name | Kind | Summary |
|---|---|---|
providerLabel |
const | |
providerName |
const | |
autoEncargoName |
const | |
autoEncargoCost |
const | |
codeAgentName |
const | |
escalateName |
const | |
IA |
component | |
modelOf |
function | The model a provider would use, as the gateway picks it. |
blocked |
function | Why a provider cannot answer now ("" when it can): the gateway then falls back to the local model. |
Summary |
component | How things stand now, saved: who answers, failures, and what was spent. |
Meter |
component | |
Tile |
component | One choice of a group, as a card: what it is, what it costs, and whether it can be used. |
Settings |
component | |
Try |
component | |
Calls |
component | |
Operator |
component | For the platform's operators: each organization's allowance of the platform's AI, and the bill. |
AllowanceRow |
component | |
ModeloLocal |
component |
web/src/pages/Installed.tsx¶
356 lines
| Name | Kind | Summary |
|---|---|---|
phaseTone |
const | |
phaseLabel |
const | Translated where shown. |
AddonPhaseBadge |
component | An installed add-on's state as a colored label. |
sourceLabel |
function | Where an add-on comes from: its Helm chart and version, or its git folder. |
useLANByAddon |
function | The add-ons' services reachable on the local network, by add-on name. |
LANLinks |
component | Links to an add-on's UIs on the local network (plain addresses for non-web services). |
fieldDefault |
function | A catalog field's starting value in the install form. |
setPath |
function | Sets a value at a dotted key ("a.b.c") in the Helm values, making the levels it needs. |
InstallForm |
component | |
AddonDetail |
component | One installed add-on: status, what a sync would change, and actions; on the Add-ons page, beside the list. |
web/src/pages/Llaves.tsx¶
506 lines
| Name | Kind | Summary |
|---|---|---|
QUE |
const | What the page says of each key: its drawing, its name and what it is for. |
AJUSTES |
const | The settings tested before they change: their name, what happens to what already exists, and what the test does. |
fecha |
const | |
estadoDe |
function | When a key expires, or when it was changed here, in a few words. |
Llaves |
component | |
instrucciones |
function | How to make the new key, and what its test does, by key; usuario: the label and placeholder of its first value, for a key of two. |
nombrePaso |
function | A step of the test, in words, by key. |
Cambiar |
component | |
Resultado |
component | How the change went: every step with a ✓ or a ✗, and what to do next. |
nombrePasoAjuste |
function | A step of a setting's test or change, in words. |
PasosAjuste |
component | |
CambiarAjuste |
component |
web/src/pages/Members.tsx¶
356 lines
| Name | Kind | Summary |
|---|---|---|
roleHelp |
const | |
nivel |
const | |
grupoLabel |
const | |
colorDe |
const | |
Inicial |
component | A person's initial in a colored circle. |
Members |
component | |
DemoLinks |
component | |
AddMember |
component | |
Orgs |
component | |
GitHubOfOrgs |
component |
web/src/pages/Mercado.tsx¶
412 lines
| Name | Kind | Summary |
|---|---|---|
tipos |
const | |
tipoColor |
const | |
paletas |
const | |
enlaceTipos |
const | |
sugeridos |
function | Details each kind of page suggests, as empty rows to fill. |
tipoNombre |
const | |
Mercado |
component | |
PuestoVista |
component | One stall: its page on a phone, as built from its form, beside its state and what to do with it. |
palabra |
function | An address word from a name: "Pastelería Ana" → "pasteleria-ana". |
achicar |
function | Shrinks a photo in the browser, so pages stay light: at most 1600 px, as JPEG. |
vacia |
const | |
PuestoEditor |
component | The stall form: opening a new one or changing one, with a live preview of the page. |
web/src/pages/NewApp.tsx¶
601 lines
| Name | Kind | Summary |
|---|---|---|
langBadge |
const | |
Result |
type | |
Cand |
interface | A repository the wizard offers, from GitHub, a GitLab or a Bitbucket workspace: what picking it needs. |
Pestana |
type | The forja tabs over the list: all of them, or one. |
NewApp |
component | |
Needs |
component | What a service depends on: rendimiento runs it (database, cache) or |
ServiceForm |
component | One service's form: port, size, replicas, domain, health check, volume, environment and secrets. |
web/src/pages/Numeros.tsx¶
49 lines
| Name | Kind | Summary |
|---|---|---|
Numeros |
component |
web/src/pages/Problems.tsx¶
379 lines
| Name | Kind | Summary |
|---|---|---|
isOpen |
function | A problem still counts while it is not dismissed or fixed and happened recently. |
headline |
function | "rendimiento.yaml rejected; the push was not built: services[0]: …" |
resolutionText |
function | The server's note on what fixed a problem, e.g. |
last30 |
function | The last 30 days (UTC, oldest first), as the server keys them. |
DayStrip |
component | A strip of the last 30 days, one cell a day, lit on the days the problem happened. |
Hint |
type | |
hints |
const | |
retriedHint |
const | |
hintFor |
function | The hint for a problem's message, in English or as the server translated it. |
readable |
function | A detail worth reading as a sentence: short, one line, and not code, a URL or a quote of something. |
toneOf |
const | |
colorOf |
const | |
Where |
component | Where a problem happened: its app, or the platform itself. |
AskAgent |
component | |
ProblemDetail |
component | One problem, in full: what happened, what to do, its 30 days, the buttons and the technical detail. |
ProblemRow |
component | A row of the list: a dot of its color, the message, and where and how often. |
Ver |
type | |
Problems |
component | |
AppProblems |
component | Open problems about one app, as a banner on its page. |
web/src/pages/Registro.tsx¶
159 lines
| Name | Kind | Summary |
|---|---|---|
levelBadge |
function | |
Linea |
component | One line: when, level, process, app and message; it opens to its attributes. |
Registro |
component | The Log page (/registro). |
web/src/pages/Request.tsx¶
141 lines
| Name | Kind | Summary |
|---|---|---|
Row |
interface | |
rows |
function | The spans in call order: each one under its parent, siblings by start. |
hue |
function | A steady color per service, so a request's hops between services show. |
RequestPage |
component | |
kindLabel |
const | |
SpanDetail |
component |
web/src/pages/RunPage.tsx¶
728 lines
| Name | Kind | Summary |
|---|---|---|
RunPage |
component | A run's page: why it failed, its steps with when each ran, live as they go, and the log of the step chosen. |
primero |
function | The step to show first: the one running or failed, else the first. |
PasoEnVivo |
type | A step's live event: its status, and its times when the server says them (an older server does not). |
enVivo |
function | |
Retry |
component | |
Cancelar |
component | Cancel the run (switched off without a connection). |
isErr |
const | |
firstError |
function | The line of the first error in a log, or -1. |
Registro |
component | A step's log with line numbers, its error lines marked and its groups as headings. |
formatLog |
function | Drops the ::group:: markers the executor uses to separate clone and step output. |
Untested |
component | |
EnSeco |
component | |
noPasaron |
const | Whether a dry run's checks did not all pass (a skipped one did not run because another failed). |
EnSecoPublicada |
component | Against the published release (step 1). |
EnSecoCopia |
component | Against a copy of the branch (step 2): its pull request's, or a short one; or why none ran. |
Revisiones |
component | A dry run's checks, each with its log (copia: the ones against the copy). |
Approve |
component | |
Conflict |
component | |
StaleLockfile |
component | |
FixRunLine |
component | One fix run for a run: who asked, how it went, and its whole log on demand. |
AskAgent |
component | |
WhyFailed |
component | |
Judge |
component |
web/src/pages/Ruta.tsx¶
633 lines
| Name | Kind | Summary |
|---|---|---|
Vista |
type | |
kindOf |
const | The kind of entries each section of one kind shows. |
kindLabel |
const | |
Monarca |
component | A monarch, which no single one of makes the whole journey. |
Tags |
component | An entry's tags, as small labels. |
Author |
component | Who wrote an entry (marked when it was an agent), when it changed, and in which cargo. |
EntryForm |
component | The form to write or change an entry: kind, title, text, tags and, for a to-do, done. |
kindColor |
const | |
Entries |
component | |
Pagina |
component | |
Vivido |
component | The "Lived" tab: what people wrote about working here, in their words (agents cannot write these). |
Cargos |
component | |
roleLabel |
const | |
access |
function | What a key may do and on which apps, as the keys table shows it. |
NewKey |
component | |
Connect |
component | |
Atajo |
component | |
Keys |
component | |
Cuaderno |
component | The notebook's sections as colored cards (C2), each with a line of what it holds. |
Ruta |
component |
web/src/pages/SenalesPage.tsx¶
84 lines
| Name | Kind | Summary |
|---|---|---|
SenalesPage |
component | |
Recibidas |
component | Every installation whose señales came here, and the team's-own switch. |
web/src/pages/Services.tsx¶
315 lines
| Name | Kind | Summary |
|---|---|---|
categoryOf |
const | |
categoryLabel |
const | |
originLabel |
const | |
Services |
component | |
ServiceDetail |
component | |
Copyable |
component | Text with a button that copies it. |
DocsHint |
component | How to describe a service for others in rendimiento.yaml (catalog:). |
web/src/pages/Setup.tsx¶
311 lines
| Name | Kind | Summary |
|---|---|---|
Pasos |
component | The three steps on the left: done, at hand, or waiting; the second says which forja was connected. |
Setup |
component | |
deAntemano |
const | |
PasoFicha |
component | Step 1: the setup token, checked by the server; a good one opens the install session in this browser. |
PasoForja |
component | Step 2: where the code lives, three cards; the one chosen shows what it needs. |
Instrucciones |
component | What to set on the forja's side, beside the form. |
Copiar |
component | The address to copy into the forja, with a button that copies it. |
ConGitLab |
component | Step 2 with a GitLab: its address, the OAuth application's id and secret; GitLab then asks to authorize it. |
ConBitbucket |
component | Step 2 with Bitbucket: the workspace, the OAuth consumer's key and secret; Bitbucket then asks to authorize it. |
PrimerosAdmins |
component |
web/src/pages/Universe.tsx¶
928 lines
| Name | Kind | Summary |
|---|---|---|
kindLabel |
const | |
sourceLabel |
const | |
Mode |
type | The way the map is drawn, remembered on this device: flat at an angle (2.5D) or in 3D. |
savedMode |
function | |
statusLabel |
const | |
Numbers |
interface | Numbers for anything on the map: its calls, how they went, and their trends. |
Road |
interface | A road between pueblos or barrios: the calls it is made of. |
edgeId |
const | |
edgeStatus |
function | How a measured call is doing: red with errors, amber when slow. |
combine |
function | The numbers of several calls together: summed calls, the worst latency at each point. |
SystemInfo |
type | An app (or a namespace) with its numbers and the calls that touch it. |
BarrioInfo |
type | A barrio with its apps, and the numbers of what comes into it. |
World |
interface | Everything the map and the panel need, made once per answer and filter. |
build |
function | |
bardaModel |
function | The wall around the organization's apps: its zaguanes, its trancas and the fence of each pueblo. |
barrioTitle |
function | A barrio's name: its own, or what it is. |
systemTitle |
const | |
Universe |
component | The Universe page. |
Go |
type | ---- the panel ---- |
Panel |
component | |
Figures |
component | |
pct |
const | |
figures |
const | |
Badge |
const | |
Spark |
component | A tiny chart with an area, for the ticker rows. |
Change |
component | The change across the period: the last quarter against the first. |
Tick |
component | |
Latency |
component | Latency over the period: p95 solid, p50 dashed. |
Sankey |
component | What comes into an app on the left and what leaves on the right, as ribbons. |
RegionPanel |
component | |
barrioKind |
function | |
Attention |
component | |
BardaPanel |
component | |
BarrioPanel |
component | |
SystemPanel |
component | |
NodePanel |
component | |
spanStatus |
const | |
Spans |
component | |
reasonLabel |
const | |
Requests |
component | |
nodeName |
function | |
EdgeRows |
component | |
EdgeList |
component | |
EdgePanel |
component | |
RoadPanel |
component |
web/src/pages/Uso.tsx¶
211 lines
| Name | Kind | Summary |
|---|---|---|
nombre |
function | A page's name for people, from its route pattern (the pattern itself when it has none). |
accion |
function | An action's name for people. |
segundos |
const | |
lentas |
const | The share of a page's measured views that took 2 s or more. |
camino |
function | |
Barras |
component | One list with a bar for each row's share, like the visits' lists. |
UsoPage |
component |
web/src/pages/Version.tsx¶
210 lines
| Name | Kind | Summary |
|---|---|---|
EnvironmentNavLink |
component | The Environment link, marked when a newer rendimiento is ready. |
describe |
const | |
useActualizar |
function | |
BotonActualizar |
component | The update button of the Environment page's header: only when a newer release is ready and an administrator looks. |
PlatformVersion |
component | The version of rendimiento that runs, and the button that moves it to the newest image its own repository built and tested. |
resumen |
function | The first lines of a release's notes, without GitHub's headings and links to every pull request. |
Publicada |
component |
web/src/trabajador/construir.ts¶
31 lines
| Name | Kind | Summary |
|---|---|---|
construirTrabajador |
function |
web/src/trabajador/registro.ts¶
135 lines
| Name | Kind | Summary |
|---|---|---|
oyentes |
const | |
avisar |
const | |
miVersion |
function | The page's own version: its entry file, as the worker's (construir.ts). |
suVersion |
function | The waiting worker's version, or undefined if it does not say within a moment. |
espera |
function | A new worker installed and waits for this page to let it in. |
vigilar |
function | |
puede |
function | Whether this page may have the worker: a built page, on https or this computer, not a browser test that did not ask. |
retirar |
function | Throws away the worker and what it kept (it is turned off on the server). |
registrarTrabajador |
function | Registers the worker, once the page has loaded. |
quienEs |
function | Tells the worker who is signed in, and in which organization: a change throws the kept answers away. |
quien |
function | The login signed in, as told by the page (empty before, or signed out). |
decirQuien |
function | |
olvidarGuardado |
function | Signing out: the worker throws away what it kept. |
recargarNueva |
function | Lets the waiting version in and reloads the page once it took over. |
useNuevaVersion |
function | Whether a new version of rendimiento waits for the person to reload. |
web/src/trabajador/sw.ts¶
232 lines
| Name | Kind | Summary |
|---|---|---|
DatosTrabajador |
interface | The service worker: what lets the page open without a connection, or while rendimiento restarts in a new version, from what this browser kept. |
Evento |
interface | |
EventoFetch |
interface | |
EventoMensaje |
interface | |
Ambito |
interface | |
trabajador |
function |
web/src/uso.ts¶
151 lines
| Name | Kind | Summary |
|---|---|---|
Accion |
type | |
rutas |
const | |
patronDe |
function | The route pattern of an address: the router's best match, or "(unknown)". |
Evento |
type | |
poner |
function | |
anotar |
function | Notes a main action on the page on screen. |
enviarUso |
function | Sends what is queued, in batches; silent when it fails (the use is not worth bothering anyone). |
terminarPendiente |
function | The page being measured ends: without a time when it was not measured. |
vista |
function | |
arrancar |
function | |
useUso |
function | Follows the pages opened, once the person is signed in (listo). |
web/vite.config.ts¶
21 lines