Repository navigation
Conversation
Reviewer's GuideThis hardening pass makes the HTTP and database lifecycle correct and testable, strengthens CI verification, and updates project documentation to accurately describe the current single-process Go/PostgreSQL architecture and its explicit non-goals. Sequence diagram for graceful HTTP server shutdownsequenceDiagram
participant OS as OS
participant Run as run()
participant Server as HTTPServer
participant Pool as PostgreSQLPool
Run->>OS: signal.NotifyContext(SIGINT, SIGTERM)
Run->>Server: serve(serverCtx, 10s)
Server->>Server: ListenAndServe()
OS-->>Run: cancellation
Run->>Server: Shutdown(timeout context)
Server-->>Run: shutdown result
Run->>Pool: Close()
Run-->>OS: return error or success
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Summary
This is the first ControlPlane P0 hardening pass after RedisForge.
1. Lifecycle correctness
ListenAndServe-only startup path with a testable graceful server lifecycleSIGINTandSIGTERM2. Verification and claim parity
go.modgofmt,go vet, race-enabled tests, build, and golangci-lint gatesARCHITECTURE_STATUS.mdAudit findings
The repository already had CI and the latest
masterrun was green, but the README described a stalemain-only workflow. More importantly, it marked graceful shutdown as complete even thoughmain.gohad no signal handling orServer.Shutdown.The repository name can also suggest a distributed/Kubernetes-style control plane. The new as-built status document makes the current boundary explicit: this is a single-process server-rendered Go/PostgreSQL governance application, not a Kubernetes controller or split control-plane/data-plane system.
Verification
The branch was squashed to one commit. CI will run again on the exact PR SHA with:
Scope
This PR does not add Phase 6 features such as metrics, tracing, Docker/Kubernetes deployment, health/readiness probes, or distributed rate limiting. The purpose is to make the existing portfolio project correct, verifiable, and honest before moving on.
Summary by Sourcery
Harden the application lifecycle and bring its CI verification and documentation in line with the repository’s actual architecture and capabilities.
New Features:
Bug Fixes:
Enhancements:
CI:
Documentation:
Tests: