g8e v1.6.4
[1.6.4] - 2026-07-25
Overview
Demo consolidation, L5 Actuator decomposition, error sentinel migration, and code quality cleanup. This release removes three underused demo environments (secure-data, dow, swarm) and their associated CLI commands, scenario files, and agent harness scenarios, reducing the demo surface from 9 to 6 environments. The L5 Actuator's monolithic Execute method is decomposed into focused helper methods (signAndLogReceipt, rehydratePayload, finalizeReceipt, signAndLogFinalReceipt) with fail-closed error handling on payload rehydration. Lattice adapter-local error sentinels and the LatticeEntityIDFilename constant are migrated to internal/constants/, and ErrCLISessionDenied is moved from l3_notary.go to internal/constants/. The ScrubbingService constructor now returns an error (fail-closed on persisted token load failure) and accepts context.Context throughout. The MCP gateway gains an AuditEventRecorder interface to eliminate nil-check branches at audit call sites. The InputSchema.ToMap() method is removed in favor of direct struct serialization. The DispatchToDownstream MCP tools/call request is fixed to properly envelope params. A demo L3 notary (G8E_L3_MOCK=true) is added for headless demo environments. A demo-verify Makefile target and CI job are added to build and run all 6 demos.
Removed
- secure-data demo —
demos/secure-data/(deleted, 222-line compose.yml + config, doctrine, target-data, README): Removed along withdemo_secure_data.go(245 lines),runSecureDataScenariodispatch,DemosOrgSecureData/DemosSecureDataDoctrineFileconstants, 3 agent harness scenarios (secure_data.go,secure_data_test.go), and all references in docs, codemap, and troubleshooting. - dow demo —
demos/dow/(deleted, 245-line compose.yml + config, doctrine, target-data, sensor Python scripts, README): Removed along withdemo_dow.go(331 lines),runDoWScenariodispatch,DemosOrgDoW/DemosDoWDoctrineFileconstants, 3 agent harness scenarios (dow_cross_cue.go,dow_cross_cue_test.go), and all references in docs, codemap, and troubleshooting. - swarm demo —
demos/swarm/(deleted, 776-line compose.yml + config, doctrine, target-data, drone simulator, README): Removed along withdemo_swarm.go(250 lines),runSwarmScenariodispatch,DemosOrgSwarm/DemosSwarmDoctrineFileconstants, 3 agent harness scenarios (swarm.go,swarm_test.go), and all references in docs, codemap, and troubleshooting. - live-swarm demo —
demos/live-swarm/(deleted, README + drone_cmd.py + tribunal-bootstrap.json): Removed as part of swarm demo consolidation. InputSchema.ToMap()—internal/services/mcp/registry.go: Removed 30-line method that manually convertedInputSchematomap[string]interface{}. TheToolstruct ininternal/cli/cmd/mcp.gonow uses*mcp.InputSchemadirectly, andhandleToolsListpassesnt.InputSchema()instead ofnt.InputSchema().ToMap().- Lattice adapter-local errors —
internal/adapters/lattice/errors.go(deleted, 31 lines): All 19 error sentinels (ErrLatticeConfigMissingthroughErrLatticeAlreadyRunning) andLatticeEntityIDFilenameconstant moved tointernal/constants/errors.goandinternal/constants/paths.go.
Added
- Demo L3 notary —
internal/services/governance/l3_notary.go:demoL3Notarystruct andNewDemoL3Notaryconstructor for demo/test environments where WebAuthn passkey enrollment is not available (headless Docker containers). Auto-approves any non-nil proof. Gated byG8E_L3_MOCK=trueenvironment variable. Must never be used in production. AuditEventRecorderinterface —internal/services/mcp/gateway.go: New interface implemented bystorage.SQLAuditStorein production andnoopAuditEventRecorderwhen no audit store is configured. Eliminates nil checks at all audit call sites inGatewayService. Added toDependenciesstruct and wired ingateway_service.goviastores.AuditStore.demo-verifyMakefile target —Makefile: New target that builds the binary and runs all 6 demo environments (healthcare, gov, finance, dhs, fedramp, frontend) sequentially, tearing down each with volumes before starting the next.- Demo verification CI job —
.github/workflows/build-and-test.yml: Newdemo-verifyjob that runsmake demo-verifyon Ubuntu, dependent on thecijob. WorkloadIdentity.IsAppSAN/IsUserSAN—protocol/workload_identity.go: Two new methods that report whether a SPIFFE ID is an app (spiffe://<trust_domain>/app/...) or user (spiffe://<trust_domain>/user/...) workload identity.- Typed cloud metadata models —
internal/services/mcp/models.go: 11 new typed structs for cloud metadata tool results (CloudMetadataRequest,CloudMetadataDetectResult,CloudMetadataInstanceResult,CloudMetadataRegionResult,CloudMetadataAvailabilityZoneResult,CloudMetadataInstanceTypeResult,CloudMetadataAllResult,CloudMetadataErrorResponse,AzureComputeMetadata,AzureInstanceMetadata), replacingmap[string]interface{}usage. - Typed container inspect model —
internal/services/mcp/sys_container_status.go:containerInspectDataandcontainerStatusResultstructs replacemap[string]interface{}with typed field access. RemovesgetNestedMap,getString,getBool,getInthelpers. - Error sentinels —
internal/constants/errors.go: New error sentinels for field path validation (ErrFieldPathInvalidCollection,ErrFieldPathInvalid,ErrFieldPathForbidden,ErrFieldPathSyntax,ErrFieldPathEmpty,ErrFieldPathEmptyCollection,ErrFieldPathDocumentNil,ErrFieldPathComponentNotFound,ErrFieldPathNotObject), gateway DB initialization (ErrGatewayDBAuditStoreInit,ErrGatewayDBSchemaInit,ErrGatewayDBStateRootInit), console (ErrConsoleStaticFS), MCP (ErrMCPContainerNameRequired,ErrMCPServiceNameRequired), transaction canonicalization (ErrTxCanonicalizeFailed), and all 19 Lattice adapter errors migrated frominternal/adapters/lattice/errors.go. - Path constants —
internal/constants/paths.go:PathSysClassDMIIDProductUUID,PathSysClassDMIIDSysVendor,LatticeEntityIDFilename. - KV key prefix —
internal/constants/kv_keys.go:ScrubbingTokenKeyPrefixconstant (uei_token_), replacing hardcoded string inboundary.go. - Auth constants —
internal/constants/auth.go:DefaultBindingPersona,DefaultTenantID,BearerScheme,L3ApprovalWindow,ErrCLISessionDenied(migrated froml3_notary.go).
Changed
- L5 Actuator
Executedecomposed —internal/services/governance/l5_actuator.go: The monolithicExecutemethod is split intosignAndLogReceipt,rehydratePayload,finalizeReceipt, andsignAndLogFinalReceipthelper methods. Payload rehydration is now fail-closed (returns error onRehydratePayloadfailure instead of logging a warning and continuing). TheRehydratableinterface check is replaced with directGetPayload/SetPayloadcalls onCommandMessage. ScrubbingServiceconstructor returns error —internal/services/scrubbing/boundary.go:NewScrubbingServicenow returns(*ScrubbingService, error)instead of*ScrubbingService. Returns error ifloadPersistedTokensfails (fail-closed). All callers updated:gateway_service.go,g8eo.go,cli/serve/gateway.go.ScrubbingServicemethods acceptcontext.Context—internal/services/scrubbing/boundary.go:RehydrateText,RehydratePayload,GetTokenForValue,loadPersistedTokens,initializeScrubbersnow acceptcontext.Context.RehydrateTextusestokenPatternpackage-level regex instead of recompiling per call.L3Notarysignature change —internal/services/governance/l3_notary.go:NewGatewayL3Notaryno longer takessuspendedStoreparameter (the gateway notary delegates to the passkey verifier for suspended transaction access).ErrCLISessionDeniedmoved tointernal/constants/.L3ApprovalWindowconstant replaces hardcoded30 * time.Minute.ExecutionHandlerinterface typed —internal/services/governance/l4_warden.go,internal/services/pubsub/pubsub_commands.go,internal/tools/chaos/chaos.go:ExecuteVerifiedTransactionparameter changed frominterface{}togovernance.CommandMessage. Chaos handler uses*pubsub.PubSubCommandMessage(pointer) instead of value.L4Warden.verifyStatefulsimplified —internal/services/governance/l4_warden.go: Returnserroronly instead of(time.Time, error).releaseNonceReservationhelper method wrapsReleaseNoncewith error logging.GovernanceEnvelopecanonicalization typed —internal/governance/envelope.go:canonicalizeMaprenamed tocanonicalizeStructand operates on*structpb.Structdirectly instead ofmap[string]interface{}.canonicalizeValueoperates on*structpb.Valuewith typed kind switching instead ofinterface{}type assertions.- MCP
DispatchToDownstreamparams envelope —internal/services/mcp/gateway.go:DispatchToDownstreamnow wraps tool name and arguments in aCallToolRequeststruct before marshaling asParams, instead of sending rawtoolArgsasParams. Fixes downstream servers failing tool name lookup. - MCP audit recording unconditional —
internal/services/mcp/gateway.go:runMaintenanceSweep,StoreSuspendedTransaction, andDispatchToDownstreamno longer nil-checkg.auditStorebefore recording events. ThenoopAuditEventRecorderhandles the no-audit-store case. GatewayServiceconstructor takesAuditStore—internal/services/gateway/gateway_service.go:Dependenciesstruct gainsAuditStorefield.NewGatewayL3Notarycall updated to dropsuspendedStoreparameter.G8E_L3_MOCKenv var check added to wireNewDemoL3Notaryfor demo environments.AuthServiceconstructor simplified —internal/services/gateway/gateway_auth.go:NewAuthServiceno longer takessecretsDirparameter. Hardcoded"default"strings replaced withconstants.DefaultBindingPersonaandconstants.DefaultTenantID."Bearer "prefix replaced withconstants.BearerScheme. User validation refactored intogetAndValidateUserhelper.GatewayDBusesRuntimeFileService—internal/services/gateway/gateway_db.go: Vault directory creation and key file writing now go throughfileSvc.MkdirAll/fileSvc.WriteFileinstead ofos.MkdirAll/os.WriteFile. Error sentinels useconstants.ErrDirCreateFailed,constants.ErrVaultKeyWriteFailed,constants.ErrGatewayDBAuditStoreInit,constants.ErrGatewayDBSchemaInit,constants.ErrGatewayDBStateRootInit.G8eoServicefield cleanup —internal/services/g8eo.go:suspendedTxCloserfield removed;suspendedTxStorefield type changed fromstorage.SuspendedTransactionStore(interface) to*storage.SuspendedTransactionService(concrete).StopcallssuspendedTxStore.Close()directly.- Demo port/organization maps refactored —
internal/cli/cmd/demos.go:demoHTTPPortsanddemoHTTPSPortsmap literals replace switch-case blocks.scenarioCountsmap updated to remove secure-data, dow, swarm entries.switchDemoPostureuses--force-recreateflag.needsGovKitchecksFedRAMPScenarioPrefixin addition toDhsScenarioPrefix. - Multi-member tribunal bootstrap —
internal/cli/cmd/scenarios_run.go:setupGovKitnow loadstribunal-bootstrap.jsonfrom the consensus seed directory to populateMemberKeyIDsfor multi-member quorum support. Signer registration errors are non-fatal warnings instead of collected errors. - Cloud metadata context propagation —
internal/services/mcp/cloud_metadata.go:detectCloudProvider,httpGetWithTimeout, and all metadata fetch functions now acceptcontext.Context. HTTP requests usehttp.NewRequestWithContextinstead ofclient.Get. - Container status typed model —
internal/services/mcp/sys_container_status.go:getContainerStatusacceptscontext.Context.commandExecutor.CombinedOutputacceptscontext.Context.containerInspectDatastruct replacesmap[string]interface{}for JSON unmarshaling. sys_service_statuscontext propagation —internal/services/mcp/sys_service_status.go:commandExecutor.CombinedOutputacceptscontext.Context. Error sentinels useconstants.ErrMCPUnmarshalArguments,constants.ErrMCPMarshalResult,constants.ErrMCPServiceNameRequired.field_parsererror sentinels —internal/services/mcp/field_parser.go: Error returns useconstants.ErrFieldPath*sentinels instead offmt.Errorfwith string messages.L1Doctrineerror handling —internal/services/governance/l1_doctrine.go:ValidatePayloadnow reports invalid regex patterns as violations instead of silently ignoring them.AnalyzeMCPArgumentsuses%w: %wfor error wrapping.gateway_http_router.goconsole path —internal/services/gateway/gateway_http_router.go: Console SPA route usesconstants.APIPaths.ConsolePrefixinstead of hardcoded"/console/".- Demo compose files —
demos/dhs/compose.yml,demos/fedramp/compose.yml: AddedG8E_L3_MOCK=trueenvironment variable for headless L3 approval.demos/healthcare/compose.yml: Removed--posture consensusflag (now uses config file default ofdoctrine).demos/healthcare/config/gateway.yml,operator.yml: Default posture changed fromconsensustodoctrine. - Swagger generation updated —
Makefile:swagger-generatetarget uses--parseDependencyLevel 1and--packagePrefixinstead of--parseDependency. - golangci vendor exclusion —
.golangci.yml: Addedvendor$to lint and formatter exclusions.
Fixed
- MCP
DispatchToDownstreamparams envelope —internal/services/mcp/gateway.go: Thetools/callJSON-RPC request was sending rawtoolArgsasParams, but the MCP protocol requiresParams: {"name": toolName, "arguments": toolArgs}. Downstream servers could not look up the tool name from the request. Fixed by wrapping inCallToolRequeststruct before marshaling. - L5 Actuator rehydration fail-closed —
internal/services/governance/l5_actuator.go: Payload rehydration failures were previously logged as warnings and execution continued with scrubbed data. Now returns an error, preventing execution with incomplete data. ScrubbingServicetoken load fail-closed —internal/services/scrubbing/boundary.go:loadPersistedTokensfailures were silently logged and ignored. NowNewScrubbingServicereturns an error if token loading fails, preventing the service from starting with a partial token map.- L1 doctrine regex error reporting —
internal/services/governance/l1_doctrine.go: Invalid forbidden pattern regexes were silently skipped inValidatePayload. Now reported as violations so operators can detect misconfigured doctrine patterns.
Tests
internal/services/governance/l3_notary_test.go— Expanded withdemoL3Notarytests andErrCLISessionDeniedmigration tests.internal/services/governance/l4_warden_test.go— Updated forverifyStatefulsignature change andreleaseNonceReservationhelper.internal/services/mcp/gateway_test.go— Updated forAuditEventRecorderinterface andnoopAuditEventRecorder.internal/services/mcp/cloud_metadata_test.go— Updated for context propagation and typed result models.internal/services/mcp/sys_container_status_test.go— Updated for typedcontainerInspectData/containerStatusResultmodels and context propagation.internal/services/scrubbing/boundary_test.go— Updated forNewScrubbingServiceerror return and context-aware methods.internal/services/gateway/gateway_service_test.go— Updated forAuditStoredependency injection andG8E_L3_MOCKenv var.internal/services/gateway/gateway_auth_test.go— Updated forAuthServiceconstructor change (nosecretsDir).internal/services/gateway/governance_controller_test.go— New tests for governance controller audit recording.internal/services/g8eo_test.go— Updated forsuspendedTxStorefield type change.internal/cli/cmd/demos_test.go— Updated for removed demo organizations and refactored port maps.internal/cli/cmd/demos_helpers_test.go— Updated for removed demo organizations.internal/cli/cmd/mcp_test.go— Updated forInputSchemadirect serialization (noToMap).internal/tools/agent_harness/scenarios/scenario_test.go— Updated for removed scenario registrations.internal/adapters/lattice/auth_test.go,config_test.go— Updated for migrated error sentinels.