Commit Graph

565 Commits

Author SHA1 Message Date
joshsiv-mulga 8db9771fbf refactor: move the instance transition-record codec to domains/ec2/instance/state
The codec defines how the canonical persisted instance record evolves, with
its assignment and observation sections, which is EC2 instance ownership rather
than node-local VM supervision. It moves unchanged into its own package and
keeps wrapping the legacy vm.InstanceRecord alias and its spec and status
types, which stay in runtime/compute/vm for now.

The domain-to-runtime import is recorded as new dependency-rule debt with its
removal condition and allow-listed against that entry. The instance-state
ratchet now names the new file as an owner file; its allowlist is unchanged.
2026-10-11 08:37:56 +10:00
joshsiv-mulga f821e3eed8 docs: record slice 1b step 1 codec and awsgw rollout qualification
Records the codec added in e62f921d2 as design Section 10 (C1 to C7): its
surface, preservation at every object level, the changed-array limitation,
marker handling, the rejection classes and its capable-writers-only scope. C2
supersedes P1's top-level-only preservation for the codec. G19 records that
old read-only gateway consumers remain safe but DescribeInstanceStatus gains
unconfirmed/degraded visibility only after awsgw upgrades. The migration record
gains the commit row and states that no production path uses the codec yet.
2026-10-10 22:34:50 +10:00
joshsiv-mulga 8fe3ea55d2 docs: record slice 1a activation-gate decisions 2026-10-10 22:16:28 +10:00
joshsiv-mulga daff8094b8 docs: record the instance-state transition-record design commit 2026-10-10 16:46:32 +10:00
joshsiv-mulga e9e11d531e docs: design the instance-state transition record and activation gate 2026-10-10 16:46:26 +10:00
joshsiv-mulga 830f704899 docs: record the narrowed instance-state ratchet commit 2026-10-10 16:38:50 +10:00
joshsiv-mulga 2a196f9ba9 test: narrow the instance-state ratchet to instance-state access
Stop freezing the JetStreamManager type and constructor, which also serve
cluster state; flag only instance-state methods, bucket and key identifiers,
record codecs and local-state access. The cluster-state-only consumers in
daemon_mgmt_ip.go and operator/cli/cluster.go leave the allowlist (73 to 67).
The self-test now proves a cluster-state use is ignored and an instance-state
method call is caught. Record the owner's disposition of the KV-unavailable
restore result in the migration record.
2026-10-10 16:38:47 +10:00
joshsiv-mulga c04222b27a docs: record ADR-0007 slice 0 instance-state inventory
Record the instance-state persistence formats, the nineteen direct
consumers by process and access kind, the characterised recovery and
schema outcomes, the generation-preservation matrix and the ratchet that
freezes the consumer set. Nothing conforms to ADR-0007 yet and vpcd stays
blocked.
2026-10-10 13:14:37 +10:00
joshsiv-mulga cf9e8ce0d0 docs: record the network contract, projection client and utils removal 2026-10-09 19:23:17 +10:00
joshsiv-mulga 7a45e7a3e7 test: characterise vpc.* network-realisation routes
Pin every vpc.* subject, JSON payload shape and the request/reply
{success,error} ack envelope exactly as they exist today, ahead of
introducing contracts/network/v1. Covers the 22 subjects registered
by domains/network/subscribers, the vpc.igw-attach/detach subjects
and InternetGatewayEvent already owned by contracts/ec2/v1, the
utils.AddNAT/PublishNATEvent client wire behaviour including the
delete-nat retry-on-ErrNoResponders budget, and the EC2-side NATEvent
and SGEvent/SGRule duplicates in domains/ec2/vpc.

Also adds the six vpc.* route-table and system-egress subjects that
were missing from service-interfaces.yaml despite being live
production routes (vpc.add/delete-igw-route, vpc.gate/ungate-subnet-
egress, vpc.add/delete-system-egress).
2026-10-09 16:25:29 +10:00
joshsiv-mulga 08b98016bd docs: record viperblockd contract, adapter and role moves 2026-10-09 15:57:49 +10:00
joshsiv-mulga 7e70222f17 refactor: move the viperblockd role to runtime/roles/viperblockd
With the EBS adapter in providers/ebs/viperblock, services/viperblockd
holds only role supervision and the opt-in live data-path tests, so it
joins the other runtime roles. It was the last package under services/;
the frozen legacy list drops it.
2026-10-09 15:57:19 +10:00
joshsiv-mulga f17e93aedf refactor: split the Viperblock EBS adapter out of services/viperblockd
Move the EBS provider adapter (volume lease, fence, dirty marker,
nbdkit recovery, provider handlers, encryption key loading) to
providers/ebs/viperblock. services/viperblockd keeps only process
lifecycle and the NATS subscription wiring that starts and stops it.

The dirty-bucket read path moves to providers/ebs/viperblock/dirty as
a read-only ListUnsealedVolumes capability; the adapter's write, clear
and purge logic stays unexported in the adapter package. Delete
services/viperblockd/vbwire now that its vocabulary lives in
contracts/viperblockd/legacy/v1 and its I/O helpers live in dirty.

Update operator/cli, the runtime service registry, qemunbdd's config
comment and the integration test harness to the new import paths, and
drop the now-stale architecture/layering allowlist and frozen-package
entries for the deleted package. Behaviour, persisted keys and NATS
subjects are unchanged.
2026-10-09 15:52:29 +10:00
joshsiv-mulga 53697bc762 refactor: move viperblockd fence, abandon and dirty-marker vocabulary to contracts
Move the fence and abandon subjects/DTOs, the dirty bucket name,
DirtyRecord and the shared volume-key pattern out of vbwire and into
contracts/viperblockd/legacy/v1, alongside the package's existing
mount/unmount/delete/sync/config-update routes. vbwire keeps only the
I/O helpers (BindDirtyBucket, ListUnsealedVolumes), now built on the
contract vocabulary instead of defining it.

Record the approved dirty-marker ownership boundary in the contract
README: the Viperblock adapter is the sole producer, viperblockd was
only its transitional custodian. Document the fence and abandon routes
and the dirty bucket in docs/service-interfaces.yaml.
2026-10-09 15:09:22 +10:00
joshsiv-mulga c2dfba8a60 docs: record operator/admin split in package-boundary migration 2026-10-09 14:51:38 +10:00
joshsiv-mulga abf734ef18 docs: qualify the migrate split and record admin and Viperblock findings
The migrate row is a split, not an exact ADR-0001 map row, and needs a map
clarification. Correct the stale admin consumers, record the operator-only
admin files as movable, the vbwire prerequisite for the Viperblock adapter
and the capability decision encryption.go needs.
2026-10-09 13:08:16 +10:00
joshsiv-mulga 8bf162fb73 refactor: move the default-VPC subject into contracts/ec2/v1
utils.SubjectEnsureDefaultVpc becomes ec2v1.EnsureDefaultVpcSubject, the
request/reply route between gateway account creation and the daemon.
Only the subject moves; the request and reply bodies are still anonymous
structs on each side and are recorded as such in the contract README.
The layering freeze now allows two utils files.
2026-10-09 13:07:40 +10:00
joshsiv-mulga 382699c563 refactor: move the layering test to module-root architecture/
The ADR-0001 layering ratchet is repository governance tooling, not
Spinifex product code, so it sits beside tests/ rather than under the
spinifex/ product tree. make test, test-cover and test-race now include
./architecture/..., and the graph walk excludes architecture/.
2026-10-09 12:36:47 +10:00
joshsiv-mulga 66b37e7b5d docs: record test-package-check and nilaway as unverified gates 2026-10-09 12:29:56 +10:00
joshsiv-mulga c3c8e28f86 refactor: drop the legacy handlers_ecr import alias
Import domains/ecr under its package name, or as ecrdomain where the
file also imports the AWS SDK ecr package, matching acmdomain. Also fix
a stale daemon file reference in the integration ECR daemon comment.
2026-10-09 12:17:01 +10:00
joshsiv-mulga 5292bd22c9 test: enforce ADR-0001 layering with a blocking ratchet
Add spinifex/architecture/layering, a test-only package that parses the
module's import graph, maps every production package to an ADR-0001
layer and checks each dependency rule as its own subtest. Existing
violations are allow-listed against their recorded debt; a new forbidden
edge, an unmapped package, a stale allowlist entry or a new package
under a frozen legacy root fails local preflight and CI.

Record the nine edges the test found missing from the migration record
(quota -> EC2 instance types, STS/Ochre/ELBv2 -> IAM, ELBv2
cross-domain, installer UI -> admin), name the importers of the utils
residuals and gateway/ec2_idempotency.go, and correct the handlers/iam
consumer list.
2026-10-09 12:01:28 +10:00
joshsiv-mulga 903c92e260 docs: record migrate move to operator/upgrade 2026-10-09 11:22:50 +10:00
joshsiv-mulga 8dacfc157c docs: reconcile package-boundary record for ADR-0001 close-out
Add the missing slice rows (the commits that dissolved spinifex/types, the
ECR repository projection, the stale-path fix and the quota move), correct
stale entries, record the dependency-rule breaks found in the import graph
with removal conditions, add the close-out table of remaining legacy paths
with their decided target owners, recount the mulga-side follow-ups, and
fix stale old-path references in docs and comments.
2026-10-09 11:15:08 +10:00
joshsiv-mulga 0fc4d449bf docs: record EKS add-on activation review decisions 2026-10-09 10:54:26 +10:00
joshsiv-mulga 2da6ea452e docs: add EKS add-on release membership and activation case study 2026-10-09 10:44:17 +10:00
joshsiv-mulga 25b3efdec4 docs: record EKS internal-route and role-ARN security corrections 2026-10-09 10:27:04 +10:00
joshsiv-mulga 7eedc555d7 docs: apply review decisions and ADR-0006 to EKS add-on v2 design 2026-10-09 09:30:43 +10:00
joshsiv-mulga 84c8c754dd docs: qualify historical architecture references 2026-10-09 08:59:41 +10:00
joshsiv-mulga 5582054bc5 docs: draft EKS add-on v2 guest contract design for review 2026-10-09 08:45:07 +10:00
joshsiv-mulga ce359fcefb docs: add EKS add-on executor, bundle, v1 compatibility and release inventories 2026-10-09 08:37:42 +10:00
joshsiv-mulga 3a55e2ee19 docs: apply review decisions to EKS add-on lifecycle design 2026-10-09 07:48:54 +10:00
joshsiv-mulga 6cfb01b47d docs: draft EKS add-on lifecycle correction design for review 2026-10-08 23:12:30 +10:00
joshsiv-mulga e274814b46 docs: update EKS add-on inventory and remaining edges 2026-10-08 23:12:30 +10:00
joshsiv-mulga 18794e0173 docs: record EKS add-on wire contract extraction 2026-10-08 23:02:20 +10:00
joshsiv-mulga 692d929b4a refactor: extract EKS add-on guest wire contract
Move the add-on status subject, delivery phase, status report, staged
manifest and internal add-ons response into contracts/eks/v1 and use it
from the handler, gateway and gatewayfetch, replacing the agent's
duplicate. Wire bytes are unchanged, including the internal add-ons body
that the SDK renderer emits with Go field names; compatibility tests pin
the JSON, the guest printf form and the TSV.
2026-10-08 23:02:20 +10:00
joshsiv-mulga 3e1abc027e docs: record EKS add-on owner extraction 2026-10-08 22:54:39 +10:00
joshsiv-mulga d899630542 refactor: extract EKS add-on owner
Move the add-on catalogue, record and manifest keys, CAS, status
transitions and staging into domains/eks/addon behind an Owner that is
the sole writer. The handler keeps AWS validation, error mapping and
projection; the cluster reconciler delegates reports through the narrow
addonReports interface; node groups call EnsureGPUDevicePlugin. Stored
keys, JSON shape, wire types and lifecycle behaviour are unchanged.
2026-10-08 22:54:27 +10:00
joshsiv-mulga 15a05d6c2c docs: record EKS add-on PassRole check 2026-10-08 22:40:30 +10:00
joshsiv-mulga 675341b561 docs: record EKS add-on lifecycle contract 2026-10-08 22:33:28 +10:00
joshsiv-mulga d804f5ac30 docs: record RDS DB parameter group owner extraction 2026-10-08 21:51:43 +10:00
joshsiv-mulga d9c3f3ca6f refactor: extract RDS DB parameter group owner
Move the parameter group and override records, keys and listing into
domains/rds/parametergroup behind an Owner. Delete asks an owner-declared
Dependants interface; instance-side resolution reads through its own
parameterGroupValues interface. SetOverrides refuses an unknown group so
no override key is written without its group. Stored shape, keys, public
errors and propagation are unchanged.
2026-10-08 21:51:08 +10:00
joshsiv-mulga 5548a7039f docs: record RDS DB parameter group lifecycle contract 2026-10-08 20:43:59 +10:00
joshsiv-mulga 15d11aff08 docs: record RDS engine catalogue owner move 2026-10-08 17:33:30 +10:00
joshsiv-mulga 4b55247819 refactor: extract RDS engine catalogue into domains/rds/engine
Move engine identity and validation, the per-engine parameter catalogues,
effective-parameter resolution, db.* instance classes and engine/orderable
selection into an engine package. Behaviour, error codes and ordering are
unchanged.

The package imports no EC2 package: instance-class memory comes from an
immutable Sizing value built from an engine-declared InstanceTypes
interface, backed by the fixed instance-type table in handlers/rds.
Effective parameters leave as an engine-owned Setting, converted to
Parameter in handlers/rds. AWS output building, paging, apply-method
mapping, storage limits and the gateway runnable check stay in the
adapter path.

The RDS agent declares its own EngineCatalog interface and types and
receives an engine-backed implementation from cmd/rds-agent, so agent
code does not import the catalogue. Cross-engine tests use the two real
engines instead of a registered fake.
2026-10-08 17:33:11 +10:00
joshsiv-mulga 292803bb1c docs: record RDS engine catalogue boundary and evidence 2026-10-08 14:43:46 +10:00
joshsiv-mulga 2b877b01a0 docs: record EKS access entry owner extraction 2026-10-08 12:34:24 +10:00
joshsiv-mulga 68ee6f620c refactor: extract EKS access entry owner into domains/eks/access
Move the access entry record, associated policy and scope types, keys,
PrincipalARNHash, the policy catalogue and group mapping into a resource
owner package. Stored JSON field names and KV keys are unchanged.

Owner is the only writer: Create, SeedCreatorAdmin, Update, Associate,
Disassociate and Delete carry the existing logic verbatim, and the put,
compare-and-set and delete primitives are private. The handler keeps AWS
validation, the cluster existence check, error mapping and projection.
Token review still reads records through the exported Get, and the cluster
prefix purge still sweeps entry keys.

List handlers/eks and the new package under spinifex_daemon so EKS-only
changes select the EKS suites.
2026-10-08 12:33:46 +10:00
joshsiv-mulga 2dec7b0de7 docs: record EKS access entry lifecycle contract 2026-10-08 11:53:52 +10:00
joshsiv-mulga 37bb781c4c docs: record ECS task definition owner extraction 2026-10-08 11:08:48 +10:00
joshsiv-mulga 544b0c6a01 refactor: extract ECS task definition owner into domains/ecs/taskdefinition
Move the task definition record, container types, keys, reference parsing,
ARN helpers and the register/deregister/resolve/list logic into a resource
owner package. Stored JSON field names and KV keys are unchanged, and
revision allocation keeps its existing non-atomic read-then-write.

The owner declares its own PortMapping and SystemControl persisted types so
it no longer depends on handlers/ecs/bus; the handler translates them onto
the assign payload. Task and service launches reach task definitions only
through a launch-side taskDefinitionResolver. AWS conversion, the guest
projection and tags stay in handlers/ecs, and gateway authz only switches to
the moved reference/ARN helpers.

List handlers/ecs and the new package under spinifex_daemon so ECS-only
changes select e2e-ecs.
2026-10-08 11:07:54 +10:00