Repository navigation
fix: close 2026-11 audit gaps and state-machine defects - #310
Conversation
Deleting a site or deployment while status=deploying was allowed because both guards only checked pending/building/running. Add deploying to both sets with regression tests.
SiteDetailPage.load ran three independent GETs sequentially (every 2s during an active deploy); CreateSitePage.init ran three more. Use Promise.all and cover both with concurrency tests.
Persist cert attempt budget/reason and age provisioning to failed; add POST cert retry endpoint (closes #306).
Mark stale pending/building/deploying rows and running rows without a port as failed through TransitionState, preserving status_history and events (closes #300).
Derive bigbase_state_age_seconds for deployment and cici_run non-terminal states, surface worst offender in metrics JSON, and evaluate state_age alert rules (closes #308).
Enforce ^[A-Z][A-Z0-9_]*$ at the MCP boundary and add integration tests for get/set/delete site env var tools (epic e83).
Single-source gosec exclusions, add UI lockfile drift guard, fix the version badge drift check, and record MCP config canonical source (e90s02/e90s04/e90s08).
Add detection, build commands, and start commands for Rust (Cargo.toml), PHP (composer.json), Java (pom.xml/build.gradle), and Ruby (Gemfile). Expose new runtimes in AllAppTypes(), AppType.IsValid(), manifest framework parsing, and CI template generation in MCP. Add security regression tests. - e81s01: Rust runtime support (cargo build --release, target/release binary) - e81s02: PHP runtime support (composer install --no-dev, php -S) - e81s03: Java runtime support (mvn/gradle, java -jar) - e81s04: Ruby runtime support (bundle install, ruby app.rb/rackup) - e81s05: App types, bigbase.toml profiles, get_ci_template for all runtimes - e81s06: Path traversal, command injection, and sentinel regression tests
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
… heal draining on boot, and drop running from state age gauge
…e column errors on domain migration
…currency, and dedupe env import keys
…ory write failures
User description
Closes #300 #301 #302 #303 #304 #305 #306 #307 #308 #309.
Summary
This integration PR addresses all gaps identified in the 2026-11 audit (
specs/audit/2026-11-hotpaths-state-machines.md), closes all 10 open issues, delivers multi-language deploy runtime support (e81s01–s06), reconciles epic/story statuses (e46, e83, e84, e86 marked done; e90 and e81 reconciled), and maintains green tests across all Go packages and the React 19 UI suite.Key Changes
TransitionState, removed undeclaredreplacedstate, centralizedIsActive,IsTerminal, andCanDeletepredicates.queued -> running -> success|failure|cancelledstates with persisteddeadline_at.provisioningcert status aging out tofailedwith timeout and retry path.getSitecalls, and bounded concurrency for bulk secret/env imports.csp_policyindeploy_defaults, proxy-level per-site CSP overrides, and[security] cspmanifest propagation.e81s00(VPS toolchains) is deferred to the harden-vps workflow.Verification
go test ./... -count=1(all 33 packages passed)go test -race ./components/deploy/ ./components/cici/ ./components/monitoring/ -count=1(0 race conditions)vitest run,tsc,eslintinui/(95 files / 749 tests passed, zero lint/type errors)bash scripts/validate-specs-yaml.sh(OK)bash scripts/trace-stories.sh(OK)PR Type
Bug fix, Enhancement, Tests
Description
Add atomic deploy state transitions and boot reconciliation
Persist CICI run deadlines and queued/running lifecycle
Age stale cert provisioning into failed with retry
Expose non-terminal state age metrics and alerts
Parallelize UI bootstrap and dedupe site fetches
Add Rust, PHP, Java, Ruby runtime defaults
Diagram Walkthrough
File Walkthrough
16 files
Persist cert attempt budget and retry endpointAtomic run transitions and persisted deadlineDefine CICI run state machineCompare-and-swap status transitions with retryAdd multi-language build and start commandsSupport rust, java, ruby app typesReport non-terminal state age metricsTrigger alerts from state age metricsExport canonical state predicatesAdd cici run migrations and reconciliationAdd cert attempt columns migrationDeduplicate getSite call in deploymentsParallelize independent page bootstrap fetchesParallelize create site init fetchesBound bulk import concurrencyUse bounded pool for env var imports3 files
Reconcile orphaned in-flight deployments on bootValidate env var key formatWire boot reconciliation into Deploy.Start1 files
Test multi-language runtime commands and profiles35 files