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>
65 lines
1.5 KiB
Go
65 lines
1.5 KiB
Go
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
|
|
|
|
package precis
|
|
|
|
// entry is the entry of a trie table
|
|
// 7..6 property (unassigned, disallowed, maybe, valid)
|
|
// 5..0 category
|
|
type entry uint8
|
|
|
|
const (
|
|
propShift = 6
|
|
propMask = 0xc0
|
|
catMask = 0x3f
|
|
)
|
|
|
|
func (e entry) property() property { return property(e & propMask) }
|
|
func (e entry) category() category { return category(e & catMask) }
|
|
|
|
type property uint8
|
|
|
|
// The order of these constants matter. A Profile may consider runes to be
|
|
// allowed either from pValid or idDisOrFreePVal.
|
|
const (
|
|
unassigned property = iota << propShift
|
|
disallowed
|
|
idDisOrFreePVal // disallowed for Identifier, pValid for FreeForm
|
|
pValid
|
|
)
|
|
|
|
// compute permutations of all properties and specialCategories.
|
|
type category uint8
|
|
|
|
const (
|
|
other category = iota
|
|
|
|
// Special rune types
|
|
joiningL
|
|
joiningD
|
|
joiningT
|
|
joiningR
|
|
viramaModifier
|
|
viramaJoinT // Virama + JoiningT
|
|
latinSmallL // U+006c
|
|
greek
|
|
greekJoinT // Greek + JoiningT
|
|
hebrew
|
|
hebrewJoinT // Hebrew + JoiningT
|
|
japanese // hirigana, katakana, han
|
|
|
|
// Special rune types associated with contextual rules defined in
|
|
// https://tools.ietf.org/html/rfc5892#appendix-A.
|
|
// ContextO
|
|
zeroWidthNonJoiner // rule 1
|
|
zeroWidthJoiner // rule 2
|
|
// ContextJ
|
|
middleDot // rule 3
|
|
greekLowerNumeralSign // rule 4
|
|
hebrewPreceding // rule 5 and 6
|
|
katakanaMiddleDot // rule 7
|
|
arabicIndicDigit // rule 8
|
|
extendedArabicIndicDigit // rule 9
|
|
|
|
numCategories
|
|
)
|