Skip to content

v0.4: Durable local control plane — PostgreSQL schema, SQLite repo, drift detector, and CLI - #24

Merged
aidankhogg merged 3 commits into
dev/alpha-tmpfrom
codex/implement-netengine-v0.4-durable-control-plane
Aug 2, 2026
Merged

v0.4: Durable local control plane — PostgreSQL schema, SQLite repo, drift detector, and CLI#24
aidankhogg merged 3 commits into
dev/alpha-tmpfrom
codex/implement-netengine-v0.4-durable-control-plane

Conversation

@aidankhogg

Copy link
Copy Markdown
Contributor

Motivation

  • Turn the provider-neutral runtime into a restart-safe single-node durable control plane for v0.4 with explicit durable partitions and recovery semantics.
  • Provide a production PostgreSQL schema while offering a lightweight SQLite DB-API reference for local CLI use and tests.
  • Add deterministic drift detection, lease/lock semantics, immutable checkpoints, and restart-safe reconciliation primitives.

Description

  • Add ADR and user-facing docs describing the v0.4 durable local control plane and PostgreSQL-backed schema in docs/ADR/004-postgresql-durable-local-control-plane.md and docs/durable-control-plane-v0.4.md.
  • Add the PostgreSQL migration SQL migrations/004_durable_control_plane.sql establishing the netengine_control schema and partitions.
  • Introduce a new netsovereign.controlplane package with models.py (domain records), repository.py (storage contract and SQLiteControlPlaneRepository), and service.py (drift detector and coordination API).
  • Wire a local control-plane CLI under control-plane in src/netsovereign/cli.py with init using the SQLite adapter, bump package version to 0.4.0, and update __version__ and lockfile entries.
  • Add unit tests in tests/test_controlplane.py exercising immutable revisions, active revision semantics, lock fencing and expiry, drift classification, and transaction rollback.

Testing

  • Ran the unit test suite with pytest -q which executed tests/test_controlplane.py and its scenarios for revision immutability, child/rejected revisions, lock fencing/expiry, drift classifications, and transaction rollback, and all tests passed.

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e6ed343c3c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/netsovereign/controlplane/service.py Outdated
Comment thread src/netsovereign/controlplane/service.py Outdated
Comment thread src/netsovereign/controlplane/repository.py Outdated
Comment thread src/netsovereign/controlplane/service.py Outdated
@aidankhogg aidankhogg self-assigned this Aug 2, 2026
@aidankhogg
aidankhogg merged commit 17b166d into dev/alpha-tmp Aug 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant