feat(autonomy): Inngest durable pipeline, budget guard, compensation registry, agent-jobs DDL#23
Open
cryptoxdog wants to merge 1 commit into
Open
feat(autonomy): Inngest durable pipeline, budget guard, compensation registry, agent-jobs DDL#23cryptoxdog wants to merge 1 commit into
cryptoxdog wants to merge 1 commit into
Conversation
…gate, and compensation layer - .github/workflows/agent-pipeline.yml — NEW gated pipeline (does not touch existing build-and-validate, deploy-to-vercel, emit-handoff, or regen-lockfile) - src/lib/budget-guard.ts — AgentBudgetGuard context manager (admission → reserve → reconcile → enforce) - src/lib/compensation.ts — CompensationRegistry saga/rollback abstraction - src/inngest/website-pipeline.ts — Inngest durable function wrapping all 10 pipeline stages with waitForEvent approval gate - src/lib/schema.sql — agent_jobs, budget_violations, compensation_log DDL - docs/autonomy-architecture.md — L9 architecture decision record for this upgrade batch
|
| */ | ||
|
|
||
| import { Inngest } from 'inngest'; | ||
| import { AgentBudgetGuard, BudgetExceededError } from '../lib/budget-guard.js'; |
| }); | ||
|
|
||
| // ── STAGE 8: Visual QA ─────────────────────────────────────────────────── | ||
| const qaResult = await step.run('run-visual-qa', async () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



L9 Autonomy Upgrade — Website-Bot
This PR adds the full autonomous runtime layer described in the L9 Nuclear Architecture Brief. All additions are new files only — no existing files modified, no workflow collisions.
Collision audit
build-and-validate.ymldeploy-to-vercel.ymlemit-handoff.ymlregen-lockfile.ymlAGENTS.mdsrc/pipeline/*Files added
.github/workflows/agent-pipeline.ymlsrc/inngest/website-pipeline.tscreateFunctionwrapping all 10 pipeline stages in durable steps. Adds approval gate (waitForEvent), budget guard, and compensation registration around Vercel deploys.src/lib/budget-guard.tsAgentBudgetGuard— 4-move runtime cost loop: Admission → Reserve → Reconcile → Enforce.src/lib/compensation.tsCompensationRegistry— LIFO saga rollback for external mutations (Vercel preview, production promotion).src/lib/schema.sqlagent_jobs,budget_violations(with trigger),compensation_log.docs/autonomy-architecture.mdNew secrets required
Add these to Settings → Secrets → Actions before enabling
agent-pipeline.yml:Approval gate
The Inngest workflow hibernates at
step.waitForEvent('website/production.approved')for up to 24 hours before promoting to production. To approve, send:{ "name": "website/production.approved", "data": { "jobId": "<job-id>" } }via the Inngest dashboard or API. On timeout, the preview deployment is automatically rolled back via the compensation registry.
Budget modes
normalcheaper_modelnarrow_scoperequire_approvalstop(throwsBudgetExceededError)Checklist
src/lib/schema.sqlto Postgres:psql $POSTGRES_URL < src/lib/schema.sqlINNGEST_EVENT_KEYandINNGEST_SIGNING_KEYto repo secretswebsitePipelinein your Inngestserve()handlerinngestpackage:npm install inngestdocs/autonomy-architecture.mdADR