feat: reimplementement dropped features (reload, health, tenant guard)#193
Closed
intel352 wants to merge 13 commits intoCrisisTextLine:mainfrom
Closed
feat: reimplementement dropped features (reload, health, tenant guard)#193intel352 wants to merge 13 commits intoCrisisTextLine:mainfrom
intel352 wants to merge 13 commits intoCrisisTextLine:mainfrom
Conversation
…ests Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
…ategies Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
… fix MakeJSONResponse status format Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Reset GoCodeAlone/modular to CrisisTextLine/modular main (v1.11.11+16 commits). Changed all module paths from CrisisTextLine to GoCodeAlone. Merged CrisisTextLine#192 (composite route strategies). Added reimplementation plans for previously GoCodeAlone-specific features: - TenantGuard framework - Dynamic Reload Manager - Aggregate Health Service - BDD/Contract Testing framework Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update all sub-modules to reference GoCodeAlone/modular v1.12.0. Add replace directive for eventbus mocks resolution. Fix letsencrypt httpserver dependency version. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The eventbus/v2 go.mod had a require + replace for the v1 eventbus module path (for mocks). The replace directive doesn't propagate to consumers, causing 'unknown revision' errors when downstream modules run go mod tidy. Fix: change test imports from .../eventbus/mocks to .../eventbus/v2/mocks (the correct v2 import path) and remove the v1 require/replace. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Analyzed existing codebase against all 4 plans: - TenantGuard: ~50% exists (context, service, config, decorators) - Dynamic Reload: ~25% exists (observer, field tracking, config providers) - Aggregate Health: ~15% exists (reverseproxy health checker) - BDD/Contract Testing: ~65% exists (121 tests, contract CLI, CI) Revised checklists to only cover remaining work. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… emission Implements HealthProvider interface, HealthReport/AggregatedHealth types, provider adapters (simple, static, composite), and AggregateHealthService with fan-out evaluation, panic recovery, cache TTL, temporary error detection, and CloudEvent emission on status changes. 17 tests including concurrency and race-detector verified. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces TenantGuard interface and StandardTenantGuard implementation with strict/lenient/disabled modes, whitelist support, ring buffer violation tracking, and CloudEvents emission on violations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…and rollback Add Reloadable interface to module.go for modules that support runtime config reloading. Implement ReloadOrchestrator with single-flight execution, exponential backoff circuit breaker, reverse-order rollback on partial failure, and CloudEvents emission for reload lifecycle. New files: - reload.go: ChangeType, ConfigChange, FieldChange, ConfigDiff, ReloadTrigger types - reload_orchestrator.go: ReloadOrchestrator with queue, circuit breaker, rollback - reload_test.go: comprehensive tests (ConfigDiff, orchestrator, rollback, circuit breaker, concurrency) Also fix pre-existing WithLogger name collision in health_service.go -> WithHealthLogger. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Reimplements 3 of the 4 features dropped during the CrisisTextLine/modular upstream reset:
Dynamic Reload Manager
Reloadableinterface for modules that support live config reloadingReloadOrchestratorwith buffered request queue, atomic CAS single-flight, circuit breaker (exponential backoff), and rollback on partial failureConfigDiffwith change tracking, prefix filtering, sensitive field redactionAggregate Health Service
HealthProviderinterface withHealthStatusenum (Unknown/Healthy/Degraded/Unhealthy)AggregateHealthServicewith concurrent fan-out, panic recovery, TTL cache (250ms), force-refresh context keyTenantGuard Enforcement
TenantGuardinterface withValidateAccess()for 3 modes: Strict (block), Lenient (log), Disabled (no-op)ViolationTypeandSeverityenumsWithTenantGuardMode(),WithTenantGuardConfig()Revised Plans
Test plan
go build ./...passesgo vet ./...passes-raceflag🤖 Generated with Claude Code