feat: Production readiness improvements for WHOOSH council formation
Major security, observability, and configuration improvements:
## Security Hardening
- Implemented configurable CORS (no more wildcards)
- Added comprehensive auth middleware for admin endpoints
- Enhanced webhook HMAC validation
- Added input validation and rate limiting
- Security headers and CSP policies
## Configuration Management
- Made N8N webhook URL configurable (WHOOSH_N8N_BASE_URL)
- Replaced all hardcoded endpoints with environment variables
- Added feature flags for LLM vs heuristic composition
- Gitea fetch hardening with EAGER_FILTER and FULL_RESCAN options
## API Completeness
- Implemented GetCouncilComposition function
- Added GET /api/v1/councils/{id} endpoint
- Council artifacts API (POST/GET /api/v1/councils/{id}/artifacts)
- /admin/health/details endpoint with component status
- Database lookup for repository URLs (no hardcoded fallbacks)
## Observability & Performance
- Added OpenTelemetry distributed tracing with goal/pulse correlation
- Performance optimization database indexes
- Comprehensive health monitoring
- Enhanced logging and error handling
## Infrastructure
- Production-ready P2P discovery (replaces mock implementation)
- Removed unused Redis configuration
- Enhanced Docker Swarm integration
- Added migration files for performance indexes
## Code Quality
- Comprehensive input validation
- Graceful error handling and failsafe fallbacks
- Backwards compatibility maintained
- Following security best practices
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
			
			
This commit is contained in:
		
							
								
								
									
										113
									
								
								vendor/golang.org/x/tools/internal/pkgbits/sync.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										113
									
								
								vendor/golang.org/x/tools/internal/pkgbits/sync.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,113 @@ | ||||
| // Copyright 2021 The Go Authors. All rights reserved. | ||||
| // Use of this source code is governed by a BSD-style | ||||
| // license that can be found in the LICENSE file. | ||||
|  | ||||
| package pkgbits | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"strings" | ||||
| ) | ||||
|  | ||||
| // fmtFrames formats a backtrace for reporting reader/writer desyncs. | ||||
| func fmtFrames(pcs ...uintptr) []string { | ||||
| 	res := make([]string, 0, len(pcs)) | ||||
| 	walkFrames(pcs, func(file string, line int, name string, offset uintptr) { | ||||
| 		// Trim package from function name. It's just redundant noise. | ||||
| 		name = strings.TrimPrefix(name, "cmd/compile/internal/noder.") | ||||
|  | ||||
| 		res = append(res, fmt.Sprintf("%s:%v: %s +0x%v", file, line, name, offset)) | ||||
| 	}) | ||||
| 	return res | ||||
| } | ||||
|  | ||||
| type frameVisitor func(file string, line int, name string, offset uintptr) | ||||
|  | ||||
| // SyncMarker is an enum type that represents markers that may be | ||||
| // written to export data to ensure the reader and writer stay | ||||
| // synchronized. | ||||
| type SyncMarker int | ||||
|  | ||||
| //go:generate stringer -type=SyncMarker -trimprefix=Sync | ||||
|  | ||||
| const ( | ||||
| 	_ SyncMarker = iota | ||||
|  | ||||
| 	// Public markers (known to go/types importers). | ||||
|  | ||||
| 	// Low-level coding markers. | ||||
| 	SyncEOF | ||||
| 	SyncBool | ||||
| 	SyncInt64 | ||||
| 	SyncUint64 | ||||
| 	SyncString | ||||
| 	SyncValue | ||||
| 	SyncVal | ||||
| 	SyncRelocs | ||||
| 	SyncReloc | ||||
| 	SyncUseReloc | ||||
|  | ||||
| 	// Higher-level object and type markers. | ||||
| 	SyncPublic | ||||
| 	SyncPos | ||||
| 	SyncPosBase | ||||
| 	SyncObject | ||||
| 	SyncObject1 | ||||
| 	SyncPkg | ||||
| 	SyncPkgDef | ||||
| 	SyncMethod | ||||
| 	SyncType | ||||
| 	SyncTypeIdx | ||||
| 	SyncTypeParamNames | ||||
| 	SyncSignature | ||||
| 	SyncParams | ||||
| 	SyncParam | ||||
| 	SyncCodeObj | ||||
| 	SyncSym | ||||
| 	SyncLocalIdent | ||||
| 	SyncSelector | ||||
|  | ||||
| 	// Private markers (only known to cmd/compile). | ||||
| 	SyncPrivate | ||||
|  | ||||
| 	SyncFuncExt | ||||
| 	SyncVarExt | ||||
| 	SyncTypeExt | ||||
| 	SyncPragma | ||||
|  | ||||
| 	SyncExprList | ||||
| 	SyncExprs | ||||
| 	SyncExpr | ||||
| 	SyncExprType | ||||
| 	SyncAssign | ||||
| 	SyncOp | ||||
| 	SyncFuncLit | ||||
| 	SyncCompLit | ||||
|  | ||||
| 	SyncDecl | ||||
| 	SyncFuncBody | ||||
| 	SyncOpenScope | ||||
| 	SyncCloseScope | ||||
| 	SyncCloseAnotherScope | ||||
| 	SyncDeclNames | ||||
| 	SyncDeclName | ||||
|  | ||||
| 	SyncStmts | ||||
| 	SyncBlockStmt | ||||
| 	SyncIfStmt | ||||
| 	SyncForStmt | ||||
| 	SyncSwitchStmt | ||||
| 	SyncRangeStmt | ||||
| 	SyncCaseClause | ||||
| 	SyncCommClause | ||||
| 	SyncSelectStmt | ||||
| 	SyncDecls | ||||
| 	SyncLabeledStmt | ||||
| 	SyncUseObjLocal | ||||
| 	SyncAddLocal | ||||
| 	SyncLinkname | ||||
| 	SyncStmt1 | ||||
| 	SyncStmtsEnd | ||||
| 	SyncLabel | ||||
| 	SyncOptLabel | ||||
| ) | ||||
		Reference in New Issue
	
	Block a user
	 Claude Code
					Claude Code