Skip to content

feat: deliver governed local full-stack MVP - #118

Merged
KinguYume-G merged 1 commit into
mainfrom
feat/AF-R04-AF-R08-local-mvp
Aug 18, 2026
Merged

KinguYume-G merged 1 commit into
mainfrom
feat/AF-R04-AF-R08-local-mvp

Conversation

@KinguYume-G

@KinguYume-G KinguYume-G commented Aug 18, 2026 •

Copy link
Copy Markdown
Owner

Linked Issues

Closes #113
Closes #114
Closes #115
Closes #116
Closes #117

Project Owner approved AF-R04 through AF-R08 as one dependency-closed batch. Human review and human merge remain required.

Objective

Deliver one reproducible local full-stack AegisFlow business loop through the existing production-shaped boundaries:

PRD / Issue → tenant-scoped FastAPI Run → Temporal durable workflow → LangGraph six-Agent computation → Policy Gate → Docker Sandbox → Reviewer → separate Human Approval → dry-run Draft PR candidate → Evaluation / Trace / Cost / Audit.

Non-Goals

  • No production OIDC claim or authentication bypass.
  • No real GitHub mutation, auto-merge, deployment, or unapproved external write.
  • No production-capacity claim for local Ollama or Docker Desktop.
  • No Kafka, Terraform, CrewAI, SFT/LoRA, general ABAC, microservice split, or Workflow Builder.

Design Note

  • docs/design-notes/LOCAL-MVP-BACKEND-BUNDLE.md
  • docs/design-notes/AF-R07-NEXTJS-CONSOLE.md
  • Accepted ADR: docs/adr/0014-local-mvp-execution-profile.md

Changes

  • Add a default-off development/test-only local profile with separate Developer and Reviewer principals.
  • Add tenant-scoped Run create/list/detail/events, clarification, approval, evidence, trace, cost, audit, and evaluation projections backed by PostgreSQL.
  • Assemble the six fixed DeliveryPack Agents behind Temporal and LangGraph with PostgreSQL checkpoint/resume.
  • Route bounded Ollama structured output through LiteLLM and the existing Model Gateway.
  • Keep Policy, exact action preview, content digest, separate Human approval, idempotency, and append-only audit on the dry-run Draft PR candidate path.
  • Add a Docker Sandbox Broker-backed execution path with bounded workspace, image, network, CPU, memory, PID, timeout, and output constraints.
  • Add the Next.js App Router Developer/Reviewer Console with server-only BFF credentials, same-origin mutation guards, contract validation, loading/error/waiting/terminal states, and approval UX.
  • Add migration 0010, local Compose overlay, configuration templates, runbook, production-readiness plan, traceability, inventory, and Handoff.

Architecture Impact

No frozen architecture boundary changes:

  • PostgreSQL remains the business fact source.
  • Temporal remains the Run lifecycle, Signal, retry, timeout, and recovery owner.
  • LangGraph remains the Agent computation and checkpoint owner.
  • Redis remains projection/cache transport only.
  • DeliveryPack remains exactly Intake, Clarifier, Context, Planner, Executor, and Reviewer.
  • The modular monolith remains intact.

Security Impact

  • No security impact
  • Security review required
  • Tool permission changed
  • Tenant boundary changed
  • Secret handling changed

Local credentials are server-only, distinct, constant-time compared, default-off, and rejected in production. The Developer cannot approve its own Run. Approval binds repository scope, base SHA, changed paths, digest, effect mode, and risk. No real Secret is committed or returned to the browser.

Tests

Commands and results:

  • .\.venv\Scripts\python.exe -m coverage run -m pytest -q -p no:cacheprovider
    • 633 passed, 1 skipped in 43.82s
    • repository coverage gate passed at 90%
    • the only skip is the protected real-GitHub test because that environment is intentionally not configured
  • npm.cmd run test:run
    • 17 passed across 8 files
  • npm.cmd run lint
    • passed
  • npm.cmd run typecheck
    • passed
  • npm.cmd run build
    • Next.js 16.3.1 production build passed; eight dynamic routes
  • Compose service health
    • Core, Temporal, Worker, PostgreSQL, Redis, Sandbox Broker, Developer Console, and Reviewer Console healthy
  • Fresh browser Run
    • Run 56e35374-fd5d-4229-b8fd-23e168ab4e4a completed 10/10 with Sandbox PASS, separate Reviewer approval, and an explicitly dry-run candidate
  • git diff --cached --check
    • passed before commit
  • credential-signature scan
    • no credential signatures detected in staged/tracked files

Reliability

  • No real external side effects in the required local path
  • Idempotency tested
  • Retry/timeout tested
  • Compensation/replay boundaries tested

Clarification and approval Signals resume the existing Temporal workflow. Duplicate Run creation, Human Signals, Activities, and Draft PR candidate effects are bounded by deterministic identities and ledgers.

Documentation

  • Updated
  • Not required, with reason

Updated README, START_HERE, architecture, configuration, decision log, traceability, repository layout, manifest, documentation index, runbook, production-readiness plan, test plans, and Handoff.

Evidence

  • docs/reports/LOCAL_MVP_RUNBOOK.md
  • docs/handoffs/2026-08-18-AF-R04-R08.md
  • docs/26_PRODUCTION_READINESS_PLAN.md

Truthful limitation: this PR proves a local full-stack MVP. It does not certify production identity, hosted-provider failover, live GitHub mutation, backup/restore, HA, or production deployment.

Rollback

Disable the local profile and Ollama route, remove the local Console/Compose overlay, and downgrade migration 0010 if complete removal is required. Existing M1–M5 and standard fail-closed production configuration remain intact.

Checklist

  • Project Owner-approved dependency-closed batch with every Issue listed
  • No real secrets
  • No unrelated refactor
  • Tests pass
  • Docs are current
  • Human review required

@KinguYume-G
KinguYume-G marked this pull request as ready for review August 18, 2026 04:17
@KinguYume-G
KinguYume-G merged commit 040afaf into main Aug 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant