Swarma Keymaker
swarma-keymaker
Role: per-station key custody. Lore name: Keymaker.
github.com/relux-works/swarma-keymaker/messageauthor is a nested codec module with a Go 1.26.8 floor; the root service remains on Go 1.26.10.
The purpose catalog allocates purpose9
message-author; its historical fixture roots and vectors remain unchanged.
The messageauthor codec publishes self-only
identity/sign request and reply grammar against exact envelope065. The dedicated
schema-8 participant implements that contract with a refusing production
current-attestation provider. Public fixture roots and independent verifier/oracle
controls establish source compatibility. The source contract
keeps production issuance, real-key provisioning and activation as separate
prerequisites. Existing Ed25519/J7 gates are unchanged.
The request/child-delegation custody contract supplies
isolated internal BIP-340 custody for purposes 7/8 and protected run/policy
lifecycle. Its opt-in internal request adapter now implements profile/1
consent_v3, envelope_v3, bound j7_pubkey and j7_enroll, with an explicitly
migrated schema-5 signing history and fences through the actual response write.
Existing Ed25519 APIs and historical vectors remain unchanged. Both production
role startups remain closed; launcher isolation, node/custody deployment and
native qualification are pending. Draft kind8185 vectors establish offline
bytes, not external network interoperability.
Explicit stopped schema-6 migration adds typed profile/2 v3
delegation_request_v3 (kind 8186) and bounded delegable-root consent_v3 only,
against Draft LIP-0014 at d0b2dcc6465fc856e334ddeef7a22f3e1dceb81b.
The parent must be explicitly listed in the current origin’s delegate set;
use and consent and_use confer no delegation. Schema 5 keeps its historical
unsupported-profile behavior. Profile/2 envelopes/enrollment, child signatures,
purpose8/v4 and production activation remain unavailable. The
generic complete request fixtures and
independent test reader establish synthetic bytes, not live interoperability.
This candidate enables no production or enforcing mode.
Keymaker derives hardened Ed25519 keys and performs narrowly permitted operations for Unix peers identified by the kernel and an active account generation. Private identity keys never enter station processes.
Status: Linux v0 core, native integration and local enrollment authority ready for review. Both the
SSH-agent subset and native control socket use the same binding/result store,
audit journal, generation authority and admission limits. Tests include real
Unix sockets and OpenSSH/Git with fixture authority. Production keymaker serve
uses the root-policy gen-journal/1 adapter when protected configuration supplies
generation_journal: {path, initial_floor: {seq, hash}}. Without it, readiness
refuses generation_source_unavailable. Pristine enrollment accepts that explicit
floor only before any binding has been issued; damaged established anchors,
rollback, fork, stale writers and reserve incidents fence without automatic
recovery. The real root-owned journal remains an activation qualification gate.
No fixture authority is compiled into normal production builds.
Persistent operator revocation remains closed pending signed-act integration
and qualified fact sources. The Q7 audit schema
specifies a closed operator-only extension with unchanged historical bytes;
historical-recovery acceptance
is PENDING implementation and qualification.
sign_registration builds registrar proofs with a separate purpose-2 key,
current binding/enrollment authority and durable same-ID recovery. The curator-approved
custody_unavailable refusal uses one response for every custody cause; only the
local audit distinguishes closed, unloaded and protection_failed. There is no
deployed security boundary or installer here.
internal/control provides bounded CCJ-1 framing and dispatch.
The public stationcaller package provides typed
request/result/refusal frame codecs for the two proposed station-caller methods.
It supplies no transport, signer, plan validator or authority and enables no
production method or purpose.
internal/keymaker supplies its kernel peer, durable request-ID, method,
workload/audit and final release adapters. The normative contract and publication
gates are in spec/keymaker.md.
internal/enrollment supplies protected pins, isolated signed-Git verification,
durable rollback state and local enrollment authority using the registrar
packages. First acceptance requires an explicit operator bootstrap through the
reconcile command; the service never initializes empty state. Every restart
requires explicit operator reconciliation. The proposed
Linux v0 and publication gates are in spec/keymaker.md.
The option C witness proposal defines a separate Keymaker stream, witnessed state epochs and startup/commit recovery rules. It is spec only: option A remains in use, and witness placement, keys, freshness, exclusion and lifecycle qualification remain open activation gates. The shared witness-service candidate proposes typed streams, append/head/proof operations, registry-checkpoint inclusion and server restore rules. It is spec only; implementation ownership, consumer-wire/transport acceptance, independent retention and capacity qualification remain open.
The Swarm Signer message proposal defines a purpose-4
message key, constrained native signing, certification and paired text vectors.
The native method remains a proposal. Stable persistent-key continuity, generation-bound authority
attestations, an owner-pinned purpose-5 issuer and its 24-hour ceiling are
decided. Signing checks key, body.author and body.author_attestation
against the caller’s own active key and current purpose-5 attestation. The
proposal aligns to accepted waggle 67df75bec015ea463f685e4daf4975ecda18816a:
exact swarma-msg/2, 24576-byte/depth12 signed records, attestation/1 and
separate registry-owner revocation authority. The
supplement’s alignment ledger
records resolved mappings; native signing, publication and qualification
remain gates.
No new method is enabled.
The pre-active provision/confirm proposal reserves
a binding while a bump successor is creating, without key issuance before
active. It recommends a separate operator method and authenticated metadata
query. Joint confirmation-currency and adapter qualification remain gates;
normal create keeps register-after-active. No new method is enabled.
| Path | Contents |
|---|---|
spec/keymaker-operator-record.md |
Proposed S1 operator-record integration, fact sources, durable replay and audit delta; no runtime activation |
spec/keymaker-time-adapter.md |
Qualified-time tightening, clause/path/slice map and external continuity/receipt/activation gates |
spec/keymaker.md |
Normative candidate contract, operator runbook and test plan |
spec/keymaker-static-gate.md |
First-run static gate statement swarma-s7 static-gate/1: preimage, closed members, consumer rule, stated limits and vectors; no importer or activation |
spec/witness-service.md |
Proposed shared typed witness protocol, registry intent/resolution inclusion, server durability and paired text vectors; no implementation or activation |
spec/keymaker-witness.md |
Proposed external-state witness, lifecycle vectors and curator review changes; no implementation or activation |
spec/keymaker-provision.md |
Proposed pre-active binding, generation-pin ordering, local confirmation and paired text vectors; no activation |
spec/keymaker-pc2.md |
Normative candidate PC2 root/intent, terminal authority fence, exact-attempt recovery and paired KR/KI/KP qualification; combined S2 storage and three joint gates remain open, production bump closed |
spec/keymaker-authority-root.md |
G4 combined schema/floor-3 format oracle, version-2 logical root, manager read set and golden byte vectors; isolated S1 codec/identity checks, no serving reader or activation |
spec/keymaker-msg.md |
Proposed Swarm Signer message domain, lifecycle, certification and text vectors; no implementation or activation |
spec/keymaker-msg-state.md |
Proposed K3 schema, exact-outcome recovery, issuance audit and durable registry/WC1 publication proof; no runtime activation |
internal/control/ |
Native framing/codec, injected authority and dispatch interfaces, socket tests |
stationcaller/ |
Public typed station-caller wire codec and byte-only tests; no signing or activation |
staticgate/ |
Public pure verifier for the static gate statement: pins, form, signature, host, window and section bytes; no signer, I/O or activation; API and limits |
internal/enrollment/ |
Linux protected pins, isolated signed-Git verification, durable CAS state and enrollment authority; API and limits |
internal/registration/ |
Registrar-owned proof construction, trusted time/entropy/signing and final recheck; API, vector coverage and limits |
go.mod, go.sum |
Go version and exact dependency pins |
vectors/ |
Paired refusal cases, published derivation controls and path examples |
cmd/keymaker/ |
Production serve, version and operator enrollment reconcile entry points |
internal/keymaker/ |
Linux custody, derivation, bindings/results, audit and both socket servers |
cmd/keymaker-window/, internal/testwindow/ |
Nonroot integration-window harness; separate from the daemon |
docs/k1a-coverage.md |
Surface A coverage and retained recovery controls |
docs/k1b-coverage.md |
Native/helper daemon coverage, recovery limits and pending deployment gates |
docs/linux-testing.md |
Test isolation, window configuration and remaining qualification gates |
tools/mutations/ |
Bounded authorization, recovery and refusal control plants using Go overlays |
packaging/ |
Exact specification unit and real daemon example config; fields, bundle contract and dependency gates |
tools/release-bundle/ |
Offline clean-commit binary, validated inputs and SHA256SUMS assembly; no installation |
tools/vectors/ |
Reproducible derivation generator and offline fixture checks, including G4 byte/preimage/pair integrity; no PC2 reader implementation |
tools/runbook-check/ |
Offline specification shell-guard checks using stubs |
UNRESOLVED_QUESTIONS.md |
Specification decisions and activation gates |
The PC2 authority requirements do not change the shipped
binding/audit/enrollment implementation. The pure S1 codec and immutable identity
functions in internal/keymaker/authority_{codec,identity}.go are unreachable
from serving. Combined-state migration,
durable handoff, independent restore custody and withdrawal-blocking gates remain
open; production bump is closed. Existing runtime and tool checks below do not
qualify PC2, and historical binding-pair documentation is not its commit model.
PC2 S2a adds an isolated preprovisioned authority-fence primitive and a pure fourteen-class aggregate capacity preflight. No serving path calls either. The preflight preserves retained recovery accounting and reserves both native snapshots, their staging copies, the logical root, metadata, proof tickets and one manager slot. Foreign-owner fence tests remain PENDING in the existing multi-UID window; transaction ordering, migration and fs-verity remain later gates.
A pure PC2 audit preparer now checks the supplied transaction/body/tail and explicit message/rotation reservations, then derives exact audit bytes, C and R without I/O, locks or collecting time. It has no serving caller and does not reserve live capacity or change the existing audit writer.
Its construction guard uses go/types to resolve calls to the actual reviewed
helper declarations, rather than matching names. The trusted boundary is
authorityFail, arStamp, decodeAuthority, encodeAuthority in
authority_codec.go; authorityCandidate, authorityTransaction,
authorityDigest, authorityCopy, sealAuthorityRoot in
authority_identity.go; validDigest in snapshot.go; and canonical,
auditDigest in audit.go. It also permits the preparer itself,
strconv.FormatUint, builtins len/append and conversions int64/uint64.
Actual supporting type/constant declarations are selected explicitly in the
test. Function-variable aliases, closures, method values, package globals and
unresolved calls are refused. Helper bodies and their transitive callees remain
reviewed trust: this guard bounds construction of the preparer, and does not
prove whole-program purity or establish runtime authority.
Tools
Linux and Go 1.26.10 are required. Enrollment validation uses the pinned registrar
packages below; the isolated BIP-340 primitives additionally use the pinned
btcec/v2 library. The wire layer uses the Go standard library.
The single-UID integration needs Git and OpenSSH (ssh-keygen). The runbook
checker needs Bash and uses /usr/sbin/visudo when installed. Multi-UID
qualification additionally requires the owner’s
pre-provisioned test accounts and noninteractive sudo permissions.
The test-window JSON optionally accepts unique lowercase id_path and
env_path fields for clean absolute executable paths. Omission preserves
/usr/bin/id and /usr/bin/env; explicit malformed/empty/null/duplicate fields
refuse before commands, and unavailable explicit executables remain PENDING
without fallback. All identity probes and tagged client/reexec routes use the
selected paths from the same configuration. This checks availability, not root
custody or sudo policy matching; the owner window remains a separate gate.
See the configuration contract.
The full-path policy test additionally requires holder-owned private TMPDIR
under root/holder-owned ancestors without group/other write or access/default
ACLs. Use an authorized protected scratch location; do not change shared modes
or treat this single-UID control as the pending distinct-UID qualification.
Hosted Linux CI creates one new run-specific fixture directory directly under
verified root ancestry using the disposable runner’s existing provisioning
privileges. It hands that inode to the unprivileged runner, verifies its receipt
and removes only its contents unprivileged at cleanup. The empty top-level
fixture remains until VM teardown; see .github/workflows/linux-ci.yml.
Before broader checks, go test ./internal/keymaker -run '^TestJ7PolicyProtectedPath$' -count=1 -timeout=90s -v
exercises the unchanged production pathname guard with that fixture.
Run from the repository root. Set SCRATCH to an existing absolute scratch
path outside tracked files; export TMPDIR="$SCRATCH" so Go test fixtures
follow it. A canonical path without .. or symlink components is required by
the protected-directory tests. The multi-UID fixture parent separately needs
client traversal; see Linux testing.
| Tool | Purpose and exact command | Outputs |
|---|---|---|
| Linux pre-release wrapper (Bash, Go 1.26.10, Git, Python 3) | On main: .scripts/release-admit.sh v1.2.3; GO=/absolute/path/to/go .scripts/release-build.sh /absolute/new/dist /absolute/source; gh workflow run release.yml --ref main -f tag=v1.2.3; isolated setup and trust boundary |
Existing native Linux amd64/arm64 offline bundles, original bundle SHA256SUMS and VERSION records, provenance.json, aggregate SHA256SUMS and release-set.json; PRE-RELEASE draft |
| OpenSSH / GitHub CLI optional bot signature | On each native Linux architecture: GO=/absolute/path/to/go .scripts/release-sign.sh v1.2.3; independent bundle rebuild and byte comparison before signing |
SHA256SUMS_linux_ARCH.sig; .temp/release-sign.* rebuild/readback evidence; agent-held key, proves nothing about origin |
| Python 3 bundle metadata and verification | .scripts/release-verify.sh /absolute/assets EXPECTED_FRAGMENT_SHA256; wrapper invokes .scripts/release-metadata.py bundle and create, draft invokes combine, verifier invokes check |
Canonical metadata from actual bundle records; owner approves the aggregate set digest in person before any root step; tag consistency pin is not a trust root |
| Release scratch controls / optional actionlint | GO=/absolute/path/to/go .scripts/release-test.sh /absolute/new/scratch; python3 .scripts/release-metadata-test.py under private TMPDIR; actionlint .github/workflows/release.yml if installed |
Real Git/SSH/offline bundle positive and negative controls, local GitHub CLI double; named logs under isolated scratch |
| Go | Run/policy/recovery fixtures: go test -p=1 ./internal/keymaker -run '^TestJ7(Policy|Run|Recovery)' -count=1; scoped races: add -race -parallel=2; narrowing controls: go run ./tools/mutations/main.go -group j7-state -scratch "$SCRATCH"; focused lifetime/migration controls: go run ./tools/mutations/main.go -group j7-continuity -scratch "$SCRATCH" |
Actual Unix connection, strict policy and journal/snapshot fixtures; overlay logs/PIDs under private scratch, not native qualification |
| Go | Compile pending distinct-UID gate only: go test -p=1 -tags multiuid ./internal/keymaker -run '^$'; qualified invocation: KEYMAKER_WINDOW_CONFIG="$WINDOW_CONFIG" KEYMAKER_J7_PROTECTED_TEST_ROOT="$PROTECTED_SCRATCH" "$TEST_BINARY" -test.run '^TestMultiUIDJ7PolicyProtection$' -keymaker-window-token="$WINDOW_TOKEN" |
Compile-only is not a test pass. Body needs reviewed existing window/permissions, holder-owned protected scratch ancestry, readable tagged binary and non-secret provenance token; missing inputs remain PENDING |
| Go | Isolated request/delegation custody: go test ./internal/keymaker -run 'TestJ7Key|TestJ7Purpose|TestJ7NoSecretExport' -count=1; fixture checker control: go test ./tools/vectors -run '^TestJ7VectorCheckerControl$' -count=1 |
Private filesystem/entropy fixtures and checker positive/negative controls; no service, durable parent allocation or runtime qualification |
| Release recipe | v0.1.0 linux/amd64 build and verification: go build -trimpath -buildvcs=false -mod=readonly -ldflags=-buildid= -o keymaker ./cmd/keymaker with the documented Go 1.26.10 environment |
keymaker and its SHA-256; no installation or activation |
| Go | Pure station-caller wire codecs: go test ./stationcaller -count=1; go build ./stationcaller |
Inert byte fixtures and build cache; no socket, signer or native activation |
| GitHub Actions | Linux CI on pull requests and pushes to main: .github/workflows/linux-ci.yml, Ubuntu 26.04, Go 1.26.10; go mod verify, go mod tidy -diff, go mod download, go build ./..., go vet ./..., bash -eo pipefail .github/scripts/check-format.sh, python3 .github/scripts/check-hygiene.py, bash -eo pipefail .github/scripts/check-controls.sh, bash -eo pipefail .github/scripts/check-pending-controls.sh, go test ./... -count=1 -timeout=25m -v |
Actions logs and private temporary fixtures; controls require stale-checksum, vet and format refusals (including broken Windows-only syntax), and four generic attribution refusals. Full checkout history preserves parent-tree provenance tests. go vet -tags multiuid ./internal/keymaker, go vet -tags qualifiedtime ./internal/enrollment ./internal/registration ./internal/keymaker and bash -eo pipefail .github/scripts/report-pending.sh compile and dynamically list both configured tag/pattern inventories as PENDING without executing their bodies. pending-inventories.txt supplies tag/pattern/package sets; pending-rows.txt is a required lower bound, never the report source: new matching rows appear automatically, and removing an expected gate requires reviewing that baseline. Real-Go controls reject missing rows, empty inventories, removed tags and compile failures; command-boundary controls preserve exact failure statuses. The provisioned window and qualified-time external inputs remain separate qualification gates; no runtime test gate or name-based skip |
| Go | Reproduce offline release fixtures: go mod download, then go test ./tools/release-bundle -count=1 (set GOMODCACHE to a fresh private directory to check cache independence) |
Isolated copies of the selected module graph, not historical checksum versions; no test-time network fetch. Missing module artifacts name the dependency and request go mod download; bundle refusal tests retain empty-proxy controls |
| Go | Fixture dependency containment: go test ./internal/timeconfidence -run '^TestTimeconfFixtureDependencyPolicy$' -count=1 -v after go mod download |
Private TMPDIR fixtures and test logs; scans inactive sources and real default/tagged production graphs offline, with isolated import and compiled-construction controls; no production activation |
| Go | Qualified-time slice A: go test ./internal/timeconfidence ./internal/enrollment -count=1; go test ./internal/registration ./internal/keymaker -run '^(TestQualifiedTime|TestTimeConfidence)' -count=1 |
Private TMPDIR logs; exact authority/uncertainty and rounding pairs, provider preservation and retained-grant checks; no native qualification |
| Go | Pending qualified-time gates: go test -tags qualifiedtime ./internal/enrollment ./internal/registration ./internal/keymaker -run '^TestQualifiedTimePending' -count=1 -v |
Expected nonzero PENDING for four missing durable issue-bound, provider continuity, pre-window audit and K3 receipt inputs; no skip and no activation |
| Go | Trusted time integration: go test ./cmd/keymaker ./internal/keymaker ./internal/registration ./internal/enrollment ./internal/control -run '^(TestTimeConfidence|TestCollectorEntryFirst)' -count=1 -v |
Provider age/uncertainty/hold boundaries, missing-policy refusal, final audit recheck, approval invalidation, null audit time and production collector/pin isolation; private TMPDIR fixtures |
| Go | Verify copied generation-vector provenance and bounded drift controls: go test ./internal/keymaker -run '^TestGenerationVector(Provenance|DriftControl)$' -count=1 -v |
Exact public source hashes and 67-case inventory; this does not run adapter verdicts |
| Go | Check terminal generation refusal handling: GOMAXPROCS=2 GOFLAGS=-p=2 GORACE=atexit_sleep_ms=0 go test -race ./internal/control ./internal/keymaker -run '^Test(GenerationSourceFencedContract|NativeGenerationAdmissionRefusal|ResponseRefusals|RetryableAllowlist)$' -count=1 -v |
Nonretryable typed refusals, one admission audit and no effects, paired active controls; private test sockets under TMPDIR |
| Go | Check local generation anchors and bounded callbacks: go test ./internal/keymaker ./internal/control -run '^TestGeneration(AnchorContinuity|SourceIncidentClassification|EvidencePredicates|DeadlineAgentAudit|DeadlineTransport|JournalConfig)$' -count=1 -v |
Local verified-view fakes, restart/incident evidence and actual bounded transport; no root-owned journal qualification |
| Go | Tagged source fixture contracts: go test -tags genjournal_testseam ./internal/keymaker -run '^TestGenerationTagged' -count=1 -v |
All 67 vectors, source no-create and real-flock ordering; isolated nonroot fixture policy. Semantic fixtures use the owner’s explicit 5s window in normal and race runs; dedicated deadline tests retain 250ms |
| Go | Race-check tagged journal paths: GOMAXPROCS=2 GOFLAGS=-p=2 GORACE=atexit_sleep_ms=0 go test -race -tags genjournal_testseam ./internal/keymaker -run '^TestGenerationTagged' -count=1 -v |
All 67 vectors, lock winners, writer progress, exact gap and restart; semantic windows accommodate instrumentation and local anchor sync without changing production timing |
| Go | Untagged byte anchor timing regression: go test ./internal/keymaker -run '^TestGenerationByteAnchorSyncDelay$' -count=1 -v |
Real 300ms Sync preserves intact/corrupt semantics under the explicit 5s test window; the 250ms neighbor refuses before callback |
| Go | Check delayed-sync fixture isolation: go test -tags genjournal_testseam ./internal/keymaker -run '^TestGenerationTagged(VectorSyncDelay|AnchorSyncDeadline|ReaderHoldWindow)$' -count=1 -v |
Real 300ms anchor audit sync admits both semantic control histories but refuses before callback with default 250ms; durable publication, source preservation and fresh default controls checked |
| Go | Check normal production build isolation: go test ./internal/keymaker -run '^TestGenerationProductionBuildBoundary$' -count=1 -v |
Dependency inventory and go version -m metadata for a temporary binary; detects a planted forbidden test tag |
| Go | All four generation controls: go run ./tools/mutations/main.go -group genjournal -scratch "$SCRATCH" |
Four named expected failures; the dependency controls use an exact public module snapshot and test-only go.work outside GOMODCACHE, with a green unmutated control; no product module replacements |
| Go | Local generation narrowing controls: go run ./tools/mutations/main.go -group genjournal-core -scratch "$SCRATCH" |
Two exact failing local anchor/classification witnesses under scratch |
| Go | Test pure proof construction: go test ./internal/registration -count=1 |
Local pinned registration vectors and generated in-memory fixture keys; no host SSH access |
| Go | Race-check proof construction: GOMAXPROCS=2 go test -race ./internal/registration -count=1 -p=1 |
Race diagnostics and verdicts |
| Go | Vet proof construction: go vet ./internal/registration ./tools/mutations |
Diagnostics |
| gofmt | Check proof formatting: gofmt -l internal/registration/*.go tools/mutations/main.go |
Empty output expected |
| keymaker | Reconcile before enrollment startup: keymaker enrollment reconcile --config "$ENROLLMENT_CONFIG" (root operator, stopped helper; optionally --confirm "$EXACT_STATE_SHA256") |
JSON lines on stdout, summary/prompt on stderr; one-use approval in protected enrollment state directory |
| Go | Sweep direct registrar Loader literals across production, tests and tools: go test ./internal/enrollment -run '^TestRegistryLoaderObjectFormat' -count=1 -v |
Source locations and explicit format expressions; planted omission controls include renamed and dot imports. Presence check only; runtime tests validate values and authority |
| Go | Test enrollment authority: go test ./internal/enrollment |
Named verdicts; isolated fixture registries/keys under the Go temporary directory, cleaned by tests |
| Keymaker | Initial operator acceptance: keymaker enrollment reconcile --config "$ENROLLMENT_CONFIG" --bootstrap [--confirm "$EXACT_STATE_SHA256"] |
v1 JSON (bootstrap: true) on stdout; summary on stderr; confirmed state and one-use receipt in the protected state directory |
| Go | Targeted race check: GOMAXPROCS=2 go test -race ./internal/enrollment -run 'TestConcurrentReloadAuthorize|TestStoreCompareAndSwap|TestInterruptedWriteFencesUntilRestart' -count=1 -p=1 |
Race diagnostics and verdicts |
| Go | Run the published enrollment fixture integration: GOPROXY=off go test -v ./internal/enrollment -run '^TestRegistrarEnrollmentConformance$' -count=1 |
114 negative/25 positive local pinned-module rows; no test-time fetch |
| Go | Vet enrollment authority: go vet ./internal/enrollment |
Diagnostics on stdout/stderr |
| gofmt | Check enrollment formatting: gofmt -l internal/enrollment/*.go |
Empty output expected |
| Git + OpenSSH | Production uses /usr/bin/git cat-file and merge-base --is-ancestor; fixture tests invoke /usr/bin/ssh-keygen -t ed25519 and Git commit-tree -S |
Local objects and temporary test-only keys; no network or inherited SSH agent |
| Go | Packaging parser and unit checks: go test ./internal/keymaker -run '^TestPackagingConfig' -count=1; go test ./tools/release-bundle -count=1 |
Paired refusals, clean-clone fixtures and offline real builds under verified private test TMPDIR roots; caller TMPDIR mode is independent |
| Go | Packaging static checks: go vet ./tools/release-bundle ./tools/mutations ./internal/keymaker; gofmt -l tools/release-bundle/*.go internal/keymaker/config_linux*.go internal/keymaker/runtime_linux.go |
Diagnostics; empty formatting output expected |
| Go | Build offline assembler: go build -trimpath -o "$SCRATCH/release-bundle" ./tools/release-bundle |
Tool binary under scratch |
| release-bundle | Assemble: "$SCRATCH/release-bundle" -repo "$SOURCE" -commit "$COMMIT" -version "$VERSION" -target "$BUNDLE" -config "$CONFIG" -name-indices "$REGISTRY" -module-cache "$MODULE_CACHE" |
New offline bundle directory; child work uses private TMPDIR scratch; unknown child files are retained |
| sha256sum | Verify before the root step: (cd "$BUNDLE" && sha256sum -c SHA256SUMS) |
Every listed file must report OK; exit 0 required |
| Go | Test the native wire layer: go test ./internal/control/... |
Test verdicts; temporary sockets cleaned by tests |
| Go | Vet the native wire layer: go vet ./internal/control/... |
Diagnostics on stdout/stderr |
| gofmt | Check formatting: gofmt -l internal/control/*.go |
Names of unformatted files; empty output expected |
| Go | Bounded decoder fuzzing: GOMAXPROCS=2 go test ./internal/control -run '^$' -fuzz '^FuzzCCJRoundTrip$' -fuzztime=20s -parallel=1 |
Verdicts and Go fuzz cache; failing corpus under internal/control/testdata/fuzz/ |
| Go | Concurrent valid helper/pubkey control: GOMAXPROCS=1 go test -race ./internal/keymaker -run '^TestHelperConcurrentPubkeyControl$' -count=20 -p=1; repeat with GOMAXPROCS=2 |
Both responses verify/succeed at the normal native budget; no reload traffic |
| Go | Reader/writer admission fairness: GOMAXPROCS=1 go test -race ./internal/enrollment ./internal/keymaker -run '^Test(AdmissionGate|ReviewR2SocketReloadFairness|HelperReloadFairnessControl)' -count=3 -p=1 |
Finite reader handoff, cancellation, failed-publication fencing, writer progress and real helper socket control |
| Go | Reload deadline and publication regressions: GOMAXPROCS=2 go test -race ./internal/keymaker -run '^Test(ReviewHelperReloadDeadline|HelperReloadPreparesOutsideWrite)$' -count=1 -p=1 |
Fixture pin I/O, real daemon sockets and authority barriers; allowed pubkey retention plus refusal-only helper audit |
| Go | Native integration checks: go test ./internal/keymaker -run '^TestNative' -count=1; race: go test -race ./internal/keymaker -run '^TestNative' -count=1 |
Verdicts; temporary fixtures under TMPDIR |
| Go | Native generation admission regressions: GOMAXPROCS=2 go test -race ./internal/keymaker ./internal/control -run '^Test(NativeGenerationAdmission|RefusedConnection)' -count=1 -p=1 |
Typed audited first-frame refusals, no execution/effect, bounded silent-peer closure and active controls |
| Go | Refusal audit deadline regressions: GOMAXPROCS=2 go test -race ./internal/keymaker -run '^Test(ReviewAdmissionQueuedAuditDeadline|NativeAdmissionStartedAuditDeadline|NativeOrdinaryRefusalAuditDeadline|JournalCancelledBeforeAppend|JournalDeadlineDuringPreparation)$' -count=1 -p=1 |
Journal contention abandons only unstarted appends, releases slots and closes without late audit; started sync completes exactly once; healthy same-daemon controls |
| Go | Static checks: go vet ./internal/keymaker ./cmd/keymaker ./internal/testwindow ./cmd/keymaker-window ./tools/mutations |
Diagnostics |
| gofmt | Format check: gofmt -l cmd internal tools/mutations |
Unformatted paths, if any |
| Go 1.26.10 | J7 typed request controls: GOTOOLCHAIN=local GOMAXPROCS=2 go test -p=1 ./internal/keymaker -run '^TestJ7(Signing|Enrollment|FirstConsent|Objects)' -count=1; use -race for the same narrow scope |
Private protected TMPDIR required; source/Unix fixture tests, no tagged native body or full suite |
| Go 1.26.10 | go test ./internal/keymaker -run '^TestJ7(Delegation|Profile2)' -count=1; add -race -p=1 for the affected fixture paths |
Unprivileged request/codec/recovery fixtures; private TMPDIR and Go caches. Native qualification remains pending |
| Go 1.26.10 | go run ./tools/vectors/main.go -check; go run ./tools/vectors/main.go -write-j7-delegation explicitly regenerates only the new generic request corpus |
vectors/j7/delegation.json; complete synthetic objects/preimages/signatures, without rewriting historical seeds/vectors |
| Go 1.26.10 | go run ./tools/mutations/main.go -group j7-delegation -scratch "$SCRATCH"; -only NAME selects one plant |
Eight requirement-derived overlays and named failing tests under private scratch; a setup/compile failure is not a kill |
| Go 1.26.10 | go run ./tools/mutations/main.go -group j7-delegation-r2 -scratch "$SCRATCH" |
Four creation-time, retained-release-time, config-floor and parent-order controls; named intended failures and command/output receipts under private scratch |
| Go 1.26.10 | `go test ./internal/keymaker -run ’J7 | Config |
| Go 1.26.10 | go run ./tools/vectors -check; go run ./tools/vectors -write-j7-signing explicitly regenerates only the synthetic draft signing corpus |
vectors/j7/signing.json; original signed domains, seeds and historical vectors are preserved |
| Go 1.26.10 | go run ./tools/mutations -group j7-signing -scratch "$SCRATCH"; -only NAME selects one plant |
Private overlays and exact test exit codes in the supplied scratch directory; kills require the named forbidden successful endpoint result |
| Go | Custody response/audit regressions: `go test -race ./internal/keymaker -run ’^Test(CustodyAudit | CustodySign |
| Stopped operator | keymaker j7 seed-init, keymaker j7 migrate, keymaker j7 policy-publish, keymaker j7 head; exact required flags and restart procedure: operator procedures. Validate with go test ./internal/keymaker/ -run 'J7Operator' -count=1 and go test ./cmd/keymaker/ -count=1 |
Service-owned fixture/custody paths; closed JSON results, or the exact two-field head JSON line for independent reconciliation and a separate root-owned pin install |
| Go | Build daemon: go build -o "$SCRATCH/keymaker" ./cmd/keymaker; run "$SCRATCH/keymaker" version or "$SCRATCH/keymaker" serve --config "$CONFIG" |
Binary; version or readiness refusal on stderr |
| Go | Harness-only checks: go test ./internal/testwindow ./cmd/keymaker-window -count=1; tagged argv unit: go test -tags multiuid ./internal/keymaker -run '^TestWindowConfiguredClientArguments$' -count=1 |
Private temporary files and fake command/argument controls only; no sudo, native body or custody qualification |
| Go | Build canonical window runner: go build -o "$SCRATCH/keymaker-window" ./cmd/keymaker-window |
Runner binary in scratch |
| Window runner | Qualify: "$SCRATCH/keymaker-window" -config "$WINDOW_CONFIG"; append -check for preflight only |
Exact status below; retained report outside its own fixture directory |
| Make | Convenience wrapper: make test-multiuid SCRATCH="$SCRATCH" WINDOW_CONFIG="$WINDOW_CONFIG" |
Prints runner status; make may normalize nonzero to 2 |
| Go | Compile pending suite: go test -c -buildvcs=false -tags multiuid -o "$SCRATCH/multiuid.test" ./internal/keymaker |
Tagged binary; compilation is not qualification |
| Go | Run narrowing controls (default core, including native): go run ./tools/mutations/main.go -scratch "$SCRATCH" |
Overlay files/logs in scratch; each mutant test must fail with exit 1; wrapper exits 0 only when all twenty-five are killed |
| Go | Run only native narrowing controls: go run ./tools/mutations/main.go -group native -scratch "$SCRATCH" |
Ten native plants from the default core group; wrapper 0 only when all are killed |
| Go | Check source applicability without executing tests: go run ./tools/mutations/main.go -check-applies -scratch "$SCRATCH"; add -group native for its subset |
Each selected plant must match exactly once; writes overlays only, not kill evidence |
| Go | Run proof narrowing controls: go run ./tools/mutations/main.go -group registration -scratch "$SCRATCH" |
Five named plants; child logs/PIDs in scratch, wrapper 0 only when all are killed |
| Go | Packaging control plants: go run ./tools/mutations/main.go -group packaging -scratch "$SCRATCH" |
Twelve named tests must fail with exit 1 and the intended witness; wrapper exits 0 only when all twelve are killed, logs/PIDs in scratch |
| Go | PC2 S1 codec/identity and isolated S2a fence/capacity checks: go test ./internal/keymaker -run 'TestPC2' -count=1 |
G4 byte oracles, real unprivileged OFD checks and pure aggregate preflight; no serving integration or platform qualification |
| Go | PC2 audit preparation and existing audit regression checks: go test ./internal/keymaker -run 'TestPC2|TestAudit' -count=1 |
Tail/reservation and cyclic-input refusals, independent frame/C/R bytes and unchanged journal append/rotation parity; pure value checks, no live transaction authority |
| Go | Check published controls, G4 byte/preimage pairs and fixture integrity: go run ./tools/vectors/main.go -check |
Summary; no service qualification |
| Go | Regenerate path examples: go run ./tools/vectors/main.go -write |
vectors/keymaker-paths.json |
| Go + Bash + visudo | Check marked shell guards, provisioning order and generated sudoers syntax with stubbed NSS/mutations: go run ./tools/runbook-check/main.go -check |
Named verdicts; real unprivileged visudo -cf on private scratch, or explicit SKIPPED with reason when absent; temporary fixtures under TMPDIR, then removed; no account writes |
| Go + Bash + visudo | Plant missing state-directory installation, lookup/path bypasses, unsupported requiretty and validation-after-allocation in memory: go run ./tools/runbook-check/main.go -plant |
Expected exit 1 naming TestRunbookStateDirectory, guard, TestRunbookWindowSudoersCompatibility and TestRunbookWindowValidationBeforeMutation failures; missing parser is SKIPPED; production files unchanged |
| Python 3 | JSON syntax: python3 -c 'import json,pathlib; [json.loads(p.read_text()) for p in pathlib.Path("vectors").glob("*.json")]' |
Exit status; no files |
| Git | Scope: git diff --check; signatures: git log --format="%h %G?" |
Diagnostics and signature verdicts |
The parser case is counted as passed only when the real parser executes and accepts the exact constrained rules. An absent parser is printed as SKIPPED with a reason and a separate count; compatibility remains unverified. All account, group, install and rename steps in the order checks are stubs; the generated policy is parsed from private scratch without changing installed sudoers.
| Direct window-runner status | Meaning |
|---|---|
| 0 | PASS (with -check, provisioning preflight only) |
| 1 | Test or execution failure |
| 2 | Usage or configuration error |
| 3 | PENDING; stderr is exactly PENDING: test window not provisioned |
make test-multiuid prints, for example, multiuid runner status: 3 (PENDING).
Make’s own exit 2 does not distinguish failure from PENDING. CI and reviewers
requiring that distinction call the compiled runner directly. A missing window
is never a skipped or passing multi-UID qualification.
Public lifecycle wire package
The j7lifecycle package provides inert closed native
hello/bind/end/rebind types, canonical framed codecs and independent synthetic
vectors. It supplies no socket client or launcher record. Existing lifecycle and
request-custody adapters are exercised through their existing real Unix seams;
no composition factory or production startup was added. Nonlegacy startup,
configuration reader floors, signing and legacy behavior remain unchanged.
The holder now separates proved-bound no-byte waiting from the unchanged
started-frame two-second budget. Hello/unbound/legacy reads stay bounded;
withdrawal, EOF and final-release fences remain. This source/fixture evidence
does not qualify deployed continuous runs or distinct-UID input isolation.
| Tool | Exact command / entry point | Outputs and limits |
|---|---|---|
| Go1.26.10 | GOTOOLCHAIN=local GOMAXPROCS=2 go test -p=1 ./j7lifecycle -count=1; go build ./j7lifecycle |
Inert value/reference checks and build cache; no runtime authority |
| Go | go test -p=1 ./internal/control -run '^TestValidRefusal$' -count=1; go test -p=1 ./internal/keymaker -run '^TestJ7Lifecycle' -count=1; add -race -parallel=2 for scoped races |
Real Unix fixture interoperability, refusal/no-effects and interrupted acknowledgement controls; protected private TMPDIR/caches required |
| Mutation tool | go run ./tools/mutations/main.go -group j7-lifecycle-wire -scratch "$SCRATCH"; use -group j7-idle for bound/unbound read-state controls |
Named changed-gate overlays, intended failing tests, child receipts/logs in supplied private scratch; setup failures are not kills |
Use the pinned SDK and site-approved resource wrapper for heavy checks. Corpus manifest/payload hashes are public byte expectations; consumers pin the reviewed source head externally. No service, account, key or operator action is implied.
Native wire layer
The wire loop takes a caller-supplied listener or connection and enforces one
sequential request at a time. Clients must wait for replies; it does not inspect
kernel receive queues to infer when clients wrote subsequent bytes. The core daemon supplies
socket provisioning, shared connection/workload limits, exact parameter schemas,
authorization, durable retries and audit. Its Observer is mandatory: every
framed attempt obtains shared work credit before parsing/hashing; every refusal
is durably reported or closes service health. Handler receives the complete
admitted Request, including its exact ID, without per-peer request guessing.
The daemon calls ServeConnAccepted with its validated UID/generation tuple
before reading hello. ServeConn remains available to transport owners that
pin at first successful hello. A changed tuple or failed generation evidence refuses and closes; continuing work requires a fresh
connection. ReleaseFence.WithActive must serialize authoritative generation,
final result/binding checks and durable audit with the actual response write for
hello and methods. Encoding and write-deadline setup precede the barrier; a
retirement that wins the barrier suppresses success and closes after a typed
refusal where transport permits it. A partial success write closes without a
second reply. The native adapter uses GenerationSource.WithActive for
hello/self reads and one WithEvidence barrier for mutation release, carrying
every generation predicate required by the fresh effect through the actual write. Exact historical
retries recover their original result under current caller authority. Transaction
selection rechecks retained state under the Store lock inside the generation
barrier before applying fresh-target predicates, including concurrent retries.
GenerationCondition.Verdict defers a target predicate to that callback; it must
be enforced before a fresh effect. Release conditions never defer predicates.
A lookup followed by an unprotected write does not satisfy this contract.
Hello does not select a binding. The first self pubkey pins that connection’s
registration number; revocation/unbinding closes it, including while idle.
Request, transaction and release checks also reject an invalid pin without
waiting for notification. A replacement requires a fresh connection. Operator
mutations address target registrations without adopting them as the operator’s
self identity, so an operator connection that has used only hello/mutations
requires no station binding. If it requests its own pubkey, that self binding
then pins the connection in the same way.
Exact retries may pass the request-ID interface for handler-owned result recovery; changed arguments must be refused by that generation-scoped interface.
The wire package tests use injected peers; TestNative* separately exercises the
real dual-surface daemon, Linux SO_PEERCRED, Master and paired durable Store.
These are fixture-authority tests, not production generation-journal or live
multi-UID qualification. See coverage.
Protected daemon configuration includes numeric service_uid, service_gid,
control_gid and operator_principal: {"uid": <number>, "generation": "<token>"},
plus socket_dir, state_dir, master_file, registry_file, master_epoch
and registry_revision. Every member is required; paths must satisfy protected
ownership rules. control_gid selects the helper group; startup fails if it
cannot publish an exactly 0660 service-owned socket with that group. The
operator’s complete UID/generation tuple, rather than group membership, grants
register/revoke intake. No supplied object can enable the absent act verifier.
Native public results contain public_key (base64 of 32 raw Ed25519 bytes),
path, registration_number and master_epoch; they contain no key material
beyond the public key. A revoke result contains the registration number and
status: "revoked".
Internal message-key slice
K3 S1 adds an internal purpose-4 sibling key capability and canonical envelope
key IDs. It has no production constructor or dispatch; sign_message remains
unsupported. Surface A and ordinary key APIs retain purpose-1 identity keys.
S2 adds an internal fixed-body purpose-5 issuer and schema-2 certification state,
described below. Native message admission and publication qualification remain
later K3 slices.
The byte/crypto helper is
swarma-envelope
v0.0.0-20261026200550-5636986d0de5. Module selection retains the existing
registrar pin; the shared time provider requires golang.org/x/sys v0.38.0.
The dependency includes newer currency APIs, but the current adapters retain
the legacy /1 profile; this update enables no /2 state or production feature.
| Tool | Exact entry point | Evidence |
|---|---|---|
| Go | go test ./internal/keymaker -run '^TestMsg' -count=1 |
Independent static SLIP-0010 fixtures, binding/custody guards and production boundary controls; task scratch logs |
| Mutation tool | go run ./tools/mutations/main.go -group message-key -scratch "$SCRATCH" |
Four overlay controls with named failing tests, child PIDs and logs below the supplied task scratch directory |
internal/keymaker/testdata/message-key.json records the pinned upstream
SLIP-0010 Python reference, its hash, the independent Ed25519 backend and public
test seed. The three custom purpose tuples are reference-generated goldens,
checked after all 12 committed published SLIP nodes matched the reference.
They are not claimed to be published SLIP vectors. Tests read static fixtures;
no Python dependency or fixture-generation code enters the production daemon.
Internal certification state
S2 implements the internal fixed-body purpose-5 issuer, strict schema-2 migration/floor checks, immutable hashed artifacts, durable intent/prepared/issued phases and offline exact-outcome recovery. The state budget includes original artifacts and recovery snapshots; admission reserves transition/proof bytes and journal headroom before writing an intent. Count or byte exhaustion applies backpressure without evicting history. Every pending transaction remains fenced. The artifact codec reference publishes the exact typed intent, candidate effect, resolution and migration formats for review.
There is no production constructor, issuance trigger, administration CLI,
publisher or activation transition. An issued candidate never becomes current;
message authority selection stays key_not_enrolled. Reconciliation holds the
exclusive state lock, has no signing dependency, restores only exact retained
committed bytes, and refuses unknown outcomes without discarding evidence.
Only known pre-issuance transactions may abort; issued candidates retain pending.
PENDING before production: independently enforced reader-floor deployment,
protected root policy, real multi-UID integration, qualified Now/W and uncertainty
mapping, provider/audit collection outside generation windows with bounded
original authority through persistence, and owner-registry/WC1 evidence. The S4/S5 spec adoption
now separates D39 prior-checkpoint custody, live freshness and process-local
receipts, with paired imported fixtures.
The retained S4/S5 fixtures originate at historical 5f4e743. Internal
in-memory adapters use the current envelope module in legacy mode and verify
journal publication proofs with the raw anchor and exact authenticated prior,
normal freshness and explicit re-anchor with endpoint/skip audit metadata, and
receipt-aware attestations/messages using one immutable Evidence lifetime.
They enforce separate 512 KiB intake, 2 MiB complete encoded proof and 8192-byte
WC1-wrapper (including LF) size gates before verifier calls. Tests exercise the
seven shared journal fixtures, three exact public S5 fixtures, receipt custody,
own-age refusals and those size boundaries; wrapper padding tests qualify size
accounting only, not real WC1 evidence.
The successor state/artifact codecs, protected floor and PC2 migration remain PENDING. S2 still rejects nonempty publication slots and current pointers; no adapter persists a receipt, commits proof/anchor/W or supplies release authority. Qualified-T1 renewal/activation, real publisher/WC1/time sources, atomic recovery and message-result release remain later integration and qualification work. All K3 gates remain closed.
| Tool | Exact entry point | Evidence |
|---|---|---|
| Go | `go test ./internal/keymaker -run ’TestMsg | TestK3’ -count=1` |
| Go | `go test ./internal/keymaker -run ’^TestMsg(NativeCapacityCommitAfterRefusal | CapacityCommitAfterRefusal)$’ -count=1 -timeout=120s` |
| Go race detector | `go test -race ./internal/keymaker -run ’^TestMsg(ConcurrentCertification | V27RenewalRestart |
| Mutation tool | go run ./tools/mutations/main.go -group message-state -scratch "$SCRATCH" |
Eight named expected-red controls, child exits/PIDs and overlay logs under private scratch; reconciliation control checks signer dependency exclusion |
| Go | go mod graph; go mod verify; go vet ./internal/keymaker ./cmd/keymaker ./tools/mutations |
Module graph, checksum and affected static validation; capture logs in private scratch |
Registrar dependency
The registration proof format, enrollment schema, publisher verification,
registry snapshot loader and name rules belong to
github.com/relux-works/swarma-registrar. The dependency is pinned
to reviewed main revision 264660e5dabb
(v0.0.0-20261025040811-264660e5dabb). Keymaker supplies caller-side trust,
persistence and local authorization; it does not maintain a second loader.
Enrollment pins require root-owned object_format, exactly sha1 or sha256,
with no default. Revision, retained state and Git object IDs must match that
single lowercase hex width. Existing pin files must explicitly add this member
before use; see the protected configuration.
The shared CCJ, enrollment, envelope and registration packages are unchanged by
this repin; the registry Loader now requires the protected format explicitly.
Any registrar API or behavior change requires a separate reviewed pull request
there and must land on its main first. Raise this dependency only in an explicit
pin-bump commit here: run go get github.com/relux-works/swarma-registrar@<full-commit-id>,
review and commit both go.mod and go.sum, update this pin, and run the affected
enrollment tests against that exact revision. A branch name or an API inventory
check is not behavior approval.
Registration helper configuration and validation
An optional registration_helper object in the protected daemon configuration
contains exactly:
{
"names": {"purpose":"host-registration","product":"sample","project":"core","agent":"station-a"},
"enrollment_config": "/etc/swarma-keymaker/enrollment-pins.json",
"approval_file": "/etc/swarma-keymaker/enrollment-approval.json"
}
Names resolve once through the configured registry to purpose 2. No request can
select a path or key. Omitting this object leaves the helper unavailable while
surface A and other control methods retain their authority rules. The existing
OperatorReconciler supplies a public startup challenge; status output reports
it. After independent freshness reconciliation and protected approval publication,
SIGHUP retries enrollment loading with that same challenge. A failed reload fences
only helper authority. The operator reconciliation command described above
provides independent freshness approval; the service never bootstraps enrollment.
Reload prepares all file/Git validation outside the enrollment write barrier,
then publishes one complete snapshot or failure fence. New helper admissions
wait cancellably during reload and return request_deadline_exceeded when their
request budget ends, releasing the shared generation and Store locks.
Trusted UTC uses the public swarma-credential-broker/timeconf provider pinned to
e7619dfc4b2a6cf1696d8a21eff603bc80f147c7. CollectorEntry is the first main
statement. The daemon’s root-owned protected configuration may embed time_policy
using the provider’s exact policy schema.
Enrollment pin configuration uses the same optional member for operator approval
time. Both configurations reject a supplied policy with
backward_tolerance_ns < 1000000000, including {"source":"off"}, during
decoding: the daemon returns invalid configuration, and pin configuration uses
its existing unverified local trust refusal. Omitting the policy remains
structurally valid; missing policy or unavailable evidence refuses
clock_untrusted before daemon readiness or approval publication.
There is no source flag, environment override,
or kernel synchronization fallback. Policy changes require a new process.
Startup samples fresh confidence before time decisions. The daemon shares that provider between helper and audit; enrollment approvals retain one provider across their initial and later publication/consumption checks. Every helper decision and post-audit release samples again. The returned uncertainty narrows key/proof validity and the exclusive authority endpoint is retained for each prepared proof through persistence and live release, including same-ID retry preparation. Reauthorization checks current enrollment without renewing that grant. Missing audit confidence retains section11’s null-time/unknown behavior. Request budgets, rate limiting and the independent CLOCK_BOOTTIME approval TTL use elapsed time; they never establish UTC confidence.
The qualified-time slice plan tightens the local
shape check to U=O+delta < A with checked nanosecond arithmetic. Enrollment
retains current delta/A in memory and uses U; its persisted issue point is
unchanged. Registration also checks U against the retained original authority.
Conservative second projection is arithmetic only; no receipt integration or
durable continuity is supplied. Audit still samples under outer/final locks, a
known contract gap. Activation stays closed pending the plan’s external inputs.
Real host provider, NTS inventory, collector isolation and storage latency qualification remain PENDING. Durable decision-bound/hold continuity across process replacement also remains an activation integration gate under the shared policy; this adapter adds fresh start sampling and within-process holds, not durable hold storage. Restart still requires independently reconciled enrollment. Root-owned generation qualification and the operator-act adapter remain activation gates.
| Tool | Purpose / exact command | Artifacts |
|---|---|---|
| Go tests | `GOPROXY=off go test -race ./internal/keymaker -run ’Test(Helper | DaemonHelper |
| Go tests | GOPROXY=off go test -race ./internal/registration -count=1 -p=1 and `GOPROXY=off go test -race ./internal/enrollment -run ’Test(WithAuthorized |
HelperVectors |
| Mutation tool | GOPROXY=off go run ./tools/mutations/main.go -group helper -scratch "$SCRATCH" |
Scratch Go overlays, exact test exits and child PIDs |
| Go vet / gofmt | go vet ./internal/keymaker ./internal/control ./internal/enrollment ./internal/registration ./cmd/keymaker ./cmd/keymaker-window ./tools/mutations; gofmt -l internal/keymaker/*.go internal/enrollment/*.go internal/registration/*.go internal/control/*.go tools/mutations/main.go |
Diagnostics to task scratch |
| Multi-UID compiler | go test -c -tags multiuid -o "$SCRATCH/multiuid.test" ./internal/keymaker |
Test binary only; reviewer runs live window |
The existing compiled window runner selects ^TestMultiUID, including helper
cases. Without configured provisioning it still returns exact PENDING/status 3;
compilation does not qualify real foreign-UID execution. Follow the existing
fixture HOME/no SSH_AUTH_SOCK isolation and keep artifacts in task scratch.
Offline release handoff
Set SOURCE to a clean checkout at the full reviewed COMMIT and VERSION to its
keymaker version string. Set BUNDLE to a new directory under an existing
operator-controlled scratch parent, outside SOURCE and system paths. CONFIG and
REGISTRY are regular operator-supplied files. MODULE_CACHE is a prepopulated Go
module cache (locate it with go env GOMODCACHE) containing the exact committed
dependency versions. The assembler uses its download cache as a read-only file
proxy, with no network fallback; writable child caches use private TMPDIR scratch. The
packaging contract documents every member and refusal.
The Linux assembler requires openat2 and Landlock ABI 3 or later. It trusts
no repository-local configuration to authorize program execution: filters
selected for tracked paths are refused explicitly; cleanliness compares raw file
hashes and index metadata without Git conversion programs. Hooks, fsmonitor,
textconv and external diff are disabled or excluded by the selected commands.
Every Git child has a private scratch write boundary. Git alone may also open a
pinned, verified /dev/null character device (major 1, minor 3) for read/write;
that inode gets no truncate, create, remove or rename rights. Builds have no
such exception. Trusted installed Git/Go executables remain prerequisites.
The target parent must be private to its owner, or sticky and owned by the
caller or root. Output uses pinned directory handles and exclusive files. An
adopted root must be empty, mode 0700 and owned by the caller. Failure cleanup
checks each recorded creation’s device/inode through its pinned parent handle,
never recursively deletes unknown contents, and retains the target directory.
Child-created cache/binary files cannot be attributed by parent-side creation
handles: private release-build-* scratch under TMPDIR is retained and its path
is printed. Use a private, disposable TMPDIR, then dispose of it separately after
reviewing the bundle. The tool removes only its recorded source/scratch objects;
unknown entries, including actor substitutions, remain untouched. VERSION.json
records the full commit and independently verified exported Git tree hash.
After assembly, verify SHA256SUMS with the exact command in the Tools table
before handing files to the owner. Follow only
specification section 12.1
for protected staging and the root step. Supply -enrollment "$ENROLLMENT_CONFIG"
to include the validated local enrollment pin configuration as enrollment.json;
omission leaves it out. Parsing does not qualify installed ownership, registry
signatures, snapshot freshness or operator reconciliation.
The control socket uses the landed native schema. Production activation
remains gated; this tool does not install or run a service.
Message-author source checks
Use the pinned Go SDK and private offline module/build caches:
go test -p=1 github.com/relux-works/swarma-keymaker/messageauthor/... -count=1
go test -p=1 -parallel=2 ./internal/keymaker -run '^TestMessageAuthor' -count=1
go build -p=1 github.com/relux-works/swarma-keymaker/messageauthor ./internal/keymaker
go vet -p=1 github.com/relux-works/swarma-keymaker/messageauthor ./internal/keymaker ./tools/mutations
go run ./tools/mutations -group message-author -scratch <private-directory>
These exercise literal wire fixtures, public fixture custody, matched receivers and closed-runtime witnesses. The mutation tool records overlays, child logs and intended-failure receipts in a new mutation subdirectory. Go caches hold build outputs. These checks provide no service activation/native qualification.
The dedicated message-author participant is specified in
the live participant contract.
Its schema-8 state, bindings, purpose-9 root capability and Unix socket are separate
from legacy and J7 roles. Production current-attestation selection refuses by default;
there is no production key loader, issuer, provisioning or activation in this slice.
The configuration example and
unit source require installer-selected
principals, socket group and protected external expected-head pin. They install nothing.
Stopped operator command source is keymaker message-author init|enroll|retire|issuer-seed-init|issuer-pin --config <root-owned-config>, with --registration-number <number> for retire. Enroll reads one
closed Binding JSON document from standard input, including the explicit purpose-1 epoch
and registration identity. That audited operator assertion is the v1 link to purpose-1;
the participant has no live legacy binding feed. Init creates no key. Successful commands
print the new expected-head document; they do not install/advance its protected pin.
Reconciliation is a private stopped-operator exact-proof primitive, with no socket method
or production reconciliation command in this slice. It never signs or issues an attestation.
| Tool | Command / entry point | Evidence |
|---|---|---|
| Go | `go test -count=1 ./internal/keymaker -run ’MessageAuthor | MALive |
| Go | go test -count=1 ./internal/control github.com/relux-works/swarma-keymaker/messageauthor/...; go test -count=1 ./cmd/keymaker -run MALive |
Closed refusal/codec and CLI source contracts |
| Mutation tool | go run ./tools/mutations -group message-author-live -scratch <private-directory> |
Named narrowing overlays, real child exits and receipts under private scratch |
Run these with the pinned Go SDK, read-only modules and absolute task-owned HOME,
caches, TMPDIR and checkout. The source-only packaging plant uses an isolated fixture
copy: Go overlays cannot mutate files read through os.ReadFile. Passing fixtures do
not establish installed ownership, multi-UID privilege, issuer/current-T qualification
or production activation. The joint O10 corpus is not produced unless its actual upstream
payload and manifest exist; historical wire and purpose-9 fixtures remain immutable.
The dedicated request-role unit and example compose lifecycle, public-key and consent handling behind the ordered J7 startup gates. Production readiness remains closed until the required static-gate importer is supplied. Delegation, root-owned configuration qualification and distinct-UID launcher/native qualification remain separate gates.
Internal message-author attestation issuer
Live issuer supplies a separate
purpose-5 Ed25519 capability from an independent SLIP-0010 seed. Its fixed path
is m/5'/1'/1'/1'; it shares no root with purpose 9 or the legacy issuer.
Schema 8 stores keymaker-message-author-state/2; schema 7 refuses by name and
has no implicit migration. The issuer uses the participant’s existing snapshot,
audit and physical byte budget, with fenced pending renewal and the book 06:94
proven pre-commit cancellation exception.
The stopped operator command source keymaker message-author issuer-seed-init --config <protected-config> explicitly creates issuer-seed in the separate
participant state directory, auditing before effects and refusing replacement.
keymaker message-author issuer-pin --config <protected-config> prints the
canonical public pin plus LF and writes no audit record. These commands do not
install a pin or activate a host. Host provisioning remains owner/Infra work.
The optional issuer_pin configuration path defaults to
/etc/swarma-keymaker/purpose5-pin.json: root-owned 0644, strict CCJ-1 plus LF,
format keymaker-purpose5-pin/1, profile attestation/1. A present pin must
match the issuer key; absence is reported as issuer_pin=absent at startup.
Production retains the single closed G-A7A2-RETENTION-SCALING gate: it never
constructs the issuing provider, and identity/sign remain
message_author_unqualified. No registry activation or publication service is
added. Source tests use fixture-only keys in protected task scratch:
| Tool | Command | Output |
|---|---|---|
| Issuer checks | go test ./internal/keymaker -run MAIssuer -count=1 |
Test log in task scratch |
| Issuer narrowing controls | go run ./tools/mutations -group message-author-issuer -scratch <private-directory> |
Per-plant logs and real-exit receipts in task scratch |
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.