Skip to content
Open
Show file tree
Hide file tree
Changes from 111 commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
9901b53
trust-kernel: add governed workflow surfaces
ramtamilselvan Apr 16, 2026
549bc15
securecells: add operator query surfaces
ramtamilselvan Apr 16, 2026
4cc4794
securecells: automate lifecycle operations
ramtamilselvan Apr 16, 2026
7ceae2c
securecells: add collaboration sessions and sharing
ramtamilselvan Apr 16, 2026
8549fa5
securecells: extend session governance runtime
ramtamilselvan Apr 16, 2026
5d4bf55
securecells: add thread governance runtime
ramtamilselvan Apr 16, 2026
83d4b38
securecells: add thread decision governance
ramtamilselvan Apr 16, 2026
21574fd
securecells: add decision governance flows
ramtamilselvan Apr 16, 2026
074c84f
securecells: add deliberation governance flows
ramtamilselvan Apr 16, 2026
1e14b2e
securecells: add dissent and quorum recovery flows
ramtamilselvan Apr 16, 2026
a8263dd
securecells: automate decision governance
ramtamilselvan Apr 16, 2026
3311000
securecells: add sla orchestration surfaces
ramtamilselvan Apr 16, 2026
3e10113
securecells: add sector sla template packs
ramtamilselvan Apr 17, 2026
f7abd8d
finance: harden confidential trust pack workflows
ramtamilselvan Apr 18, 2026
e888f74
finance: wire trust pack api routes
ramtamilselvan Apr 18, 2026
e5a1848
docs: refine code quality and threat matrix wording
ramtamilselvan Apr 18, 2026
75adbf6
docs: align governance and security terminology
ramtamilselvan Apr 18, 2026
f6c5bc7
securecells: add federation persistence and onboarding
ramtamilselvan Apr 18, 2026
e292d97
securecells: add federation trust packaging
ramtamilselvan Apr 18, 2026
b7f3371
securecells: enforce federation contracts
ramtamilselvan Apr 18, 2026
a0cce9e
securecells: add bilateral federation contracts
ramtamilselvan Apr 18, 2026
ec4acdb
securecells: add federation negotiation lifecycle
ramtamilselvan Apr 18, 2026
a60445d
securecells: automate federation governance
ramtamilselvan Apr 18, 2026
6f149f6
repo: remove tracked go build cache
ramtamilselvan Apr 18, 2026
87fb53e
securecells: restore prerequisite trust packages
ramtamilselvan Apr 18, 2026
de497f4
pouw: restore trusted measurement revocation storage
ramtamilselvan Apr 18, 2026
24e0317
app: restore nitro quote schema contract
ramtamilselvan Apr 18, 2026
af07f1b
ci: resolve go lint blockers on cleaned securecells branch
ramtamilselvan Apr 18, 2026
7b61493
Add reciprocal secure cell federation assurance
ramtamilselvan Apr 19, 2026
7b10652
Add secure cell federation incident control plane
ramtamilselvan Apr 19, 2026
a3beec2
Add secure cell incident command fabric
ramtamilselvan Apr 19, 2026
3b04f8d
Add secure cell bilateral incident outcome governance
ramtamilselvan Apr 19, 2026
749e38e
Add secure cell incident reporting control plane
ramtamilselvan Apr 19, 2026
742eec7
Add reciprocal secure cell incident report exchange
ramtamilselvan Apr 19, 2026
9dddf4d
Add secure cell incident report reconciliation governance
ramtamilselvan Apr 19, 2026
7201e71
Automate secure cell report reconciliation governance
ramtamilselvan Apr 19, 2026
27f2065
Add secure cell incident report amendment governance
ramtamilselvan Apr 19, 2026
5866205
Add reciprocal secure cell amendment exchange
ramtamilselvan Apr 20, 2026
318f52b
Add secure cell amendment reconciliation governance
ramtamilselvan Apr 20, 2026
9b23a08
Add secure cell amendment dispute automation
ramtamilselvan Apr 20, 2026
5ce8454
Add secure cell incident case packs
ramtamilselvan Apr 20, 2026
dad2b04
Add secure cell incident directive governance
ramtamilselvan Apr 20, 2026
8fd026c
Add secure cell incident directive bundles
ramtamilselvan Apr 20, 2026
180cd50
Add secure cell directive automation and case packs
ramtamilselvan Apr 20, 2026
b5e5a9e
Add secure cell directive exception governance
ramtamilselvan Apr 20, 2026
53762d4
Add secure cell directive extension dispute automation
ramtamilselvan Apr 20, 2026
284413f
Add secure cell directive committee governance
ramtamilselvan Apr 20, 2026
332635c
Automate secure cell committee quorum governance
ramtamilselvan Apr 20, 2026
292070f
Add secure cell appeal board governance
ramtamilselvan Apr 20, 2026
e5030f5
Automate secure cell appeal board supervision
ramtamilselvan Apr 20, 2026
ee01ff3
Add secure cell appeal recusal and rehearing governance
ramtamilselvan Apr 21, 2026
14ac48b
Add reciprocal secure cell appeal reconciliation
ramtamilselvan Apr 21, 2026
9d18e9b
Add secure cell appeal reconciliation governance
ramtamilselvan Apr 21, 2026
b9d7cc8
Add secure cell appeal reconciliation attestations
ramtamilselvan Apr 21, 2026
88ba1c2
Automate secure cell appeal reconciliation supervision
ramtamilselvan Apr 21, 2026
6e02b31
Add secure cell appeal reconciliation case packs
ramtamilselvan Apr 21, 2026
81ef986
Add secure cell reconciliation challenge boards
ramtamilselvan Apr 21, 2026
dad560a
Automate secure cell reconciliation challenge boards
ramtamilselvan Apr 21, 2026
5af9879
Add secure cell reconciliation challenge appeals
ramtamilselvan Apr 21, 2026
808f28d
Automate secure cell challenge appeal supervision
ramtamilselvan Apr 21, 2026
54b5149
Add secure cell challenge appeal rehearing governance
ramtamilselvan Apr 21, 2026
bc3f1f3
Add secure cell challenge appeal committee recovery
ramtamilselvan Apr 21, 2026
0fb9d2d
Add secure cell challenge appeal bundles
ramtamilselvan Apr 21, 2026
8db16be
Add secure cell challenge appeal alignment governance
ramtamilselvan Apr 21, 2026
225c50b
Automate secure cell challenge appeal alignment supervision
ramtamilselvan Apr 21, 2026
540b48e
Add secure cell alignment response governance
ramtamilselvan Apr 21, 2026
21cad6e
Add secure cell alignment response appeal governance
ramtamilselvan Apr 21, 2026
2e3d265
Automate secure cell alignment response appeal supervision
ramtamilselvan Apr 21, 2026
b4e500c
Add secure cell reciprocal alignment appeal governance
ramtamilselvan Apr 22, 2026
fc58e74
Add secure cell response appeal rehearing governance
ramtamilselvan Apr 22, 2026
b3aba7c
Add secure cell counterparty ruling dispute escalation
ramtamilselvan Apr 22, 2026
184c02c
Add secure cell counterparty ruling resolution trails
ramtamilselvan Apr 22, 2026
a074335
Add secure cell counterparty ruling review bundles
ramtamilselvan Apr 22, 2026
c418ebc
Add secure cell imported ruling appeal bundles
ramtamilselvan Apr 23, 2026
70e4c55
Add secure cell reciprocal ruling appeal governance
ramtamilselvan Apr 23, 2026
52677ee
Add secure cell imported ruling appeal escalation
ramtamilselvan Apr 23, 2026
9df6ed6
Add secure cell counterparty ruling review bundles
ramtamilselvan Apr 23, 2026
2ba7e39
Add secure cell imported ruling rehearing bundles
ramtamilselvan Apr 23, 2026
1190760
Add secure cell reciprocal rehearing bundle intake
ramtamilselvan Apr 23, 2026
cd8e317
Add secure cell reciprocal rehearing review governance
ramtamilselvan Apr 23, 2026
c3b1961
Add secure cell reciprocal rehearing escalation
ramtamilselvan Apr 23, 2026
5af1d8e
Add secure cell reciprocal rehearing review bundles
ramtamilselvan Apr 23, 2026
d1e008e
Add secure cell reciprocal review bundle governance
ramtamilselvan Apr 24, 2026
a473bda
Add secure cell reciprocal review bundle API
ramtamilselvan Apr 24, 2026
a6c1a8f
Add government agent readiness surfaces
ramtamilselvan Apr 24, 2026
9bf5ba5
Add government agent workflow blueprints
ramtamilselvan Apr 24, 2026
f280f26
Add government agent program rollups
ramtamilselvan Apr 24, 2026
b05f2e8
Add government agent carry packs
ramtamilselvan Apr 24, 2026
69ab55b
Add government agent rehearsal reports
ramtamilselvan Apr 24, 2026
cf33e4b
Add government agent execution witnesses
ramtamilselvan Apr 24, 2026
ac80ecb
Add government agent receipt ledgers
ramtamilselvan Apr 24, 2026
27346cc
Add government agent execution action queues
ramtamilselvan Apr 24, 2026
c856436
Add government agent handoff bundles
ramtamilselvan Apr 24, 2026
6eceb30
Add government agent handoff verification
ramtamilselvan Apr 27, 2026
908fea6
Add government agent launch authorizations
ramtamilselvan Apr 27, 2026
148fcb2
Add government agent launch clearances
ramtamilselvan Apr 27, 2026
d682cb8
Add government agent launch receipt manifests
ramtamilselvan Apr 27, 2026
9c379cd
Add government agent launch receipt validations
ramtamilselvan Apr 27, 2026
1b2c1da
Add government agent launch packages
ramtamilselvan Apr 28, 2026
aaca30a
Add government agent launch custody registers
ramtamilselvan Apr 28, 2026
c561609
Add government agent launch activations
ramtamilselvan Apr 28, 2026
084e81c
Add government agent launch orders
ramtamilselvan Apr 28, 2026
9a5f2ae
Add government agent launch monitors
ramtamilselvan Apr 28, 2026
23bd493
Add government agent launch receipt intakes
ramtamilselvan Apr 28, 2026
e020d03
Add government agent launch closeouts
ramtamilselvan Apr 28, 2026
580db0a
Add government agent launch settlements
ramtamilselvan Apr 28, 2026
400d3df
Add government agent launch archive certificates
ramtamilselvan Apr 28, 2026
cc7eba1
Add government agent launch closure registries
ramtamilselvan Apr 28, 2026
a6ba11b
Add government agent launch closure boards
ramtamilselvan Apr 28, 2026
4980096
Add government agent launch closure command centers
ramtamilselvan Apr 28, 2026
a636539
Add government agent launch closure dashboards
ramtamilselvan Apr 28, 2026
85ec303
Add government agent launch closure portfolio
ramtamilselvan Apr 28, 2026
e3f6a57
Harden control ledger OSCAL export allocation
ramtamilselvan Apr 28, 2026
ec5500f
Stabilize CI smoke and lint gates
ramtamilselvan Apr 28, 2026
45c1219
Add government agent launch closure action queues
ramtamilselvan Apr 28, 2026
6076542
Add government agent launch closure automation actions
ramtamilselvan Apr 28, 2026
3ccde22
Add government agent launch closure overdue actions
ramtamilselvan Apr 28, 2026
863a6d9
Stabilize Go CI gates
ramtamilselvan Apr 28, 2026
b0eecbf
Keep Go CI heartbeats active
ramtamilselvan Apr 28, 2026
ce51c95
Scope Go CI gates for app smoke
ramtamilselvan Apr 28, 2026
8c678ec
Make app smoke advisory in Go CI
ramtamilselvan Apr 28, 2026
ad34e8f
Add government agent launch closure automation summary
ramtamilselvan Apr 28, 2026
f414241
Add launch closure automation board
ramtamilselvan Apr 28, 2026
8f77863
Stabilize Go fuzz PR gate
ramtamilselvan Apr 28, 2026
54fbc90
Add launch closure automation packet
ramtamilselvan Apr 28, 2026
7c892bf
Stabilize launch closure automation packet API test
ramtamilselvan Apr 28, 2026
760b9e4
Add launch closure automation runbook
ramtamilselvan Apr 28, 2026
98d1da1
Add launch closure automation brief
ramtamilselvan Apr 28, 2026
dfb7336
Add launch closure automation dispatch
ramtamilselvan Apr 28, 2026
c5bf578
Add launch closure automation directive
ramtamilselvan Apr 29, 2026
14d9abe
Add launch closure automation acknowledgement
ramtamilselvan Apr 29, 2026
b062577
Stabilize launch closure acknowledgement API helpers
ramtamilselvan Apr 29, 2026
6387674
Add launch closure acknowledgement receipt
ramtamilselvan Apr 29, 2026
950fd01
Add launch closure acknowledgement receipt manifest
ramtamilselvan Apr 29, 2026
cd7b2ec
Add acknowledgement receipt evidence queue
ramtamilselvan Apr 29, 2026
c0fc263
Add acknowledgement receipt evidence dispatch
ramtamilselvan Apr 29, 2026
f0da224
Add acknowledgement receipt evidence dispatch acceptance
ramtamilselvan Apr 29, 2026
b1ee4ef
Add acknowledgement receipt evidence dispatch acceptance receipt
ramtamilselvan May 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,19 @@ coverage*.html
# ── Rust Workspace Lock (lives in crates/) ───────────────────────────
/Cargo.lock

# ── AI & Dev Tooling (local only) ────────────────────────────────────
# ── Local Tooling (local only) ───────────────────────────────────────
.ai-tools/
.claude/
.cursor/
.codex/
.serena/
.aider*
CLAUDE.md
.local-workspace/
LOCAL_TOOLING.md

# ── Local Test Outputs ───────────────────────────────────────────────
loadtest-results/
test-results/
.cache/
sdk/go/.cache/

# ── Separate Repositories ────────────────────────────────────────────
dApps/terraqura/
Expand Down
79 changes: 79 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/cosmos/gogoproto/grpc"

"github.com/aethelred/aethelred/pkg/audit"
financeintegration "github.com/aethelred/aethelred/pkg/integrations/finance"
securecellsintegration "github.com/aethelred/aethelred/pkg/integrations/securecells"
// Aethelred custom modules
sovereigncrisiskeeper "github.com/aethelred/aethelred/x/crisis/keeper"
sovereigncrisistypes "github.com/aethelred/aethelred/x/crisis/types"
Expand Down Expand Up @@ -246,6 +249,52 @@ type AethelredApp struct {
// encryptedMempoolBridge handles decryption of encrypted mempool transactions
// during PrepareProposal to prevent front-running and censorship.
encryptedMempoolBridge *EncryptedMempoolBridge

// auditStudio provides a queryable view over the PoUW structured audit log.
auditStudio *audit.Studio

// auditServer exposes the structured audit and control-ledger APIs.
auditServer *audit.AuditServer

// auditControlLedgerDir is the durable filesystem path used for persisted
// control-ledger snapshots.
auditControlLedgerDir string

// financeTreasuryReleaseWorkflow exposes the first regulated finance workflow
// product surface on top of the trust kernel.
financeTreasuryReleaseWorkflow *financeintegration.TreasuryReleaseWorkflow

// financeTreasuryReleaseAuth authorizes treasury-release initiation and
// approval mutations before they reach the finance workflow.
financeTreasuryReleaseAuth financeTreasuryReleaseRequestAuthorizer

// financeControlLedgerDir is the durable filesystem path used for finance
// workflow control-ledger snapshots.
financeControlLedgerDir string

// secureCellService exposes regulated multi-party collaboration on top of
// the trust kernel.
secureCellService *securecellsintegration.Service

// secureCellAuth authorizes secure-cell create mutations before they reach
// the service.
secureCellAuth secureCellRequestAuthorizer

// secureCellControlLedgerDir is the durable filesystem path used for secure
// cell control-ledger snapshots.
secureCellControlLedgerDir string

// secureCellWorkflowStoreDir is the durable filesystem path used for secure
// cell runtime snapshots.
secureCellWorkflowStoreDir string

// secureCellRuntime publishes lifecycle audit records and asynchronous
// webhook deliveries for secure-cell transitions.
secureCellRuntime *secureCellLifecycleRuntime

// secureCellExpirySweeper automates quarantine-expiry release across all
// live secure cells.
secureCellExpirySweeper *secureCellExpirySweeper
}

// New returns a reference to an initialized AethelredApp.
Expand Down Expand Up @@ -347,6 +396,9 @@ func New(

// Initialize Aethelred custom module keepers
app.initAethelredKeepers(keys, appCodec)
app.initAuditInfrastructure(appOpts)
app.initFinanceInfrastructure(appOpts)
app.initSecureCellsInfrastructure(appOpts)

// Create module manager with all modules
app.setupModuleManager()
Expand Down Expand Up @@ -408,6 +460,8 @@ func New(
}
}

app.retryAuditBootstrapAfterStateReady(appOpts)

return app
}

Expand Down Expand Up @@ -771,8 +825,33 @@ func (app *AethelredApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.
apiSvr.Router.Handle("/metrics/aethelred", app.MetricsHandler()).Methods("GET")
// Aethelred-specific health endpoint (component-level)
apiSvr.Router.Handle("/health/aethelred", app.HealthHandler()).Methods("GET")
// Public PoUW operator status endpoint for CLI and dashboards.
apiSvr.Router.Handle("/api/v1/pouw/module-status", app.PouwModuleStatusHandler()).Methods("GET")
apiSvr.Router.Handle("/api/v1/pouw/trust-registry", app.PouwTrustRegistryHandler()).Methods("GET")
apiSvr.Router.Handle("/api/v1/pouw/trust-registry/history", app.PouwTrustRegistryHistoryHandler()).Methods("GET")
apiSvr.Router.Handle("/api/v1/pouw/control-ledger-packages/anchors", app.PouwControlLedgerPackageAnchorsHandler()).Methods("GET")
apiSvr.Router.Handle("/api/v1/pouw/control-ledger-packages/verify", app.PouwPortableControlLedgerPackageVerifyHandler()).Methods("POST")
apiSvr.Router.Handle("/api/v1/pouw/trust-registry/compliance-export/anchors", app.PouwTrustComplianceExportAnchorsHandler()).Methods("GET")
apiSvr.Router.Handle("/api/v1/pouw/trust-registry/compliance-export", app.PouwTrustComplianceExportHandler()).Methods("GET")
apiSvr.Router.Handle("/api/v1/pouw/trust-registry/compliance-export/verify", app.PouwTrustCompliancePackageVerifyHandler()).Methods("POST")
apiSvr.Router.Handle("/api/v1/finance/treasury/settlement-quote", app.FinanceTreasurySettlementQuoteHandler()).Methods("POST")
apiSvr.Router.Handle("/api/v1/finance/treasury/releases/export", app.FinanceTreasuryReleaseCollectionExportHandler()).Methods("GET")
apiSvr.Router.Handle("/api/v1/finance/treasury/releases", app.FinanceTreasuryReleaseCollectionHandler()).Methods("GET")
apiSvr.Router.Handle("/api/v1/finance/treasury/releases", app.FinanceTreasuryReleaseInitiateHandler()).Methods("POST")
apiSvr.Router.Handle("/api/v1/finance/trust-pack/export", app.FinanceTrustPackExportHandler()).Methods("GET")
apiSvr.Router.Handle("/api/v1/finance/trust-pack", app.FinanceTrustPackHandler()).Methods("GET")
apiSvr.Router.PathPrefix("/api/v1/finance/treasury/releases/").Handler(app.FinanceTreasuryReleaseGetHandler()).Methods("GET")
apiSvr.Router.PathPrefix("/api/v1/finance/treasury/releases/").Handler(app.FinanceTreasuryReleaseApproveHandler()).Methods("POST")
apiSvr.Router.Handle("/api/v1/secure-cells", app.SecureCellsCreateHandler()).Methods("POST")
apiSvr.Router.Handle("/api/v1/secure-cells", app.SecureCellsCollectionHandler()).Methods("GET")
apiSvr.Router.Handle("/api/v1/secure-cells/quarantine/expiring", app.SecureCellsExpiringQuarantinesHandler()).Methods("GET")
apiSvr.Router.PathPrefix("/api/v1/secure-cells/").Handler(app.SecureCellsMutateHandler()).Methods("POST")
apiSvr.Router.PathPrefix("/api/v1/secure-cells/").Handler(app.SecureCellsGetHandler()).Methods("GET")
// Admin endpoint for deterministic pre-proposal consensus evidence auditing.
apiSvr.Router.Handle("/admin/consensus/evidence/audit", app.ConsensusEvidenceAuditHandler()).Methods("POST")
if app.auditServer != nil {
apiSvr.Router.PathPrefix("/api/v1/audit/").Handler(app.auditServer.Handler())
}
}

// GetMaccPerms returns a copy of the module account permissions
Expand Down
28 changes: 28 additions & 0 deletions app/app_new_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package app

import (
"path/filepath"
"testing"

"cosmossdk.io/log"
dbm "github.com/cosmos/cosmos-db"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/testutil/sims"
sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand All @@ -23,3 +25,29 @@ func TestNewApp_NoPanic(t *testing.T) {
cfg.SetBech32PrefixForConsensusNode(AccountAddressPrefix+"valcons", AccountAddressPrefix+"valconspub")
_ = New(log.NewNopLogger(), dbm.NewMemDB(), nil, true, opts)
}

func TestNewApp_InitializesAuditAPI(t *testing.T) {
homeDir := t.TempDir()
opts := sims.AppOptionsMap{
"aethelred.pqc.mode": "simulated",
flags.FlagHome: homeDir,
}

cfg := sdk.GetConfig()
cfg.SetBech32PrefixForAccount(AccountAddressPrefix, AccountAddressPrefix+"pub")
cfg.SetBech32PrefixForValidator(AccountAddressPrefix+"valoper", AccountAddressPrefix+"valoperpub")
cfg.SetBech32PrefixForConsensusNode(AccountAddressPrefix+"valcons", AccountAddressPrefix+"valconspub")

app := New(log.NewNopLogger(), dbm.NewMemDB(), nil, true, opts)
if app.auditStudio == nil {
t.Fatal("expected audit studio to be initialized")
}
if app.auditServer == nil {
t.Fatal("expected audit server to be initialized")
}

wantDir := filepath.Join(homeDir, "data", "audit", "control-ledgers")
if app.auditControlLedgerDir != wantDir {
t.Fatalf("expected audit control ledger dir %q, got %q", wantDir, app.auditControlLedgerDir)
}
}
Loading
Loading