Skip to content

Add Git-authored controller desired state - #33

Merged
Nickfost merged 57 commits into
mainfrom
agent/git-authored-controller-desired-state
Jul 22, 2026
Merged

Add Git-authored controller desired state#33
Nickfost merged 57 commits into
mainfrom
agent/git-authored-controller-desired-state

Conversation

@Nickfost

@Nickfost Nickfost commented Jul 18, 2026

Copy link
Copy Markdown
Member

Closes #32.

Advances #21 by adding the engine-side installer and adoption workflow that consumes Git-authored private controller configuration.

What changed

  • vendors the schema-v3 controller, pool, location, and capacity contract
  • adds strict desired-state validation and host-safe environment rendering
  • adds one-command --check, --install, --adopt, --upgrade, --rollback, and --uninstall modes
  • pins both private configuration and public engine revisions to full commit SHAs
  • adds drain-aware upgrades, atomic release staging, complete checkpoints, verified failed-activation rollback, host-local locking, and periodic drift detection
  • preserves prior runtime, manager, and maintenance-unit/timer state across rollback
  • keeps capacity in private infrastructure configuration while application workflows submit all independent jobs
  • documents fresh installation, legacy adoption, maintenance, secrets, and rollback

Security and operating boundaries

  • no credentials, private endpoints, or host addresses are committed
  • private Git credentials remain host-side and may be read-only
  • the installer rejects embedded URL credentials and moving branch refs
  • controller changes drain managed runners before replacement
  • rollback does not restart a controller while a managed runner remains active
  • cleanup remains scoped and does not perform global Docker pruning
  • VM or machine backups remain an external infrastructure checkpoint
  • existing ignore rules for local configuration, credentials, keys, and runtime state remain enforced

Validation

Passed at current head:

  • shell syntax and diff checks
  • 11 desired-state unit tests
  • 31 private-configuration policy tests
  • deterministic installer tests covering fresh install, idempotency, worktree execution, drift, repair, failed activation rollback, runtime/manager restoration, upgrades, drained state, uninstall, and legacy adoption
  • existing planner and capacity-preflight tests
  • reference, multi-host, and freshly initialized template validation
  • a real Docker pause→stop and queued-SIGTERM proof on isolated disposable development-host containers
  • full isolated development-host validation of head 61b9728eda98c70db93f2254c2dc5a955a1774b7, including both image builds, runner tool smoke tests, cleanup dry-run, and dependency-free tracked-secret scan
  • all 41 valid Codex findings addressed; one signal-order suggestion rejected with direct Docker 29.6.2 evidence; every inline review thread resolved

The repository's GitHub Actions workflow additionally runs ShellCheck and Docker image builds.

Related work

@Nickfost
Nickfost marked this pull request as ready for review July 18, 2026 23:19
@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@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: a5d2ed418e

ℹ️ 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 scripts/install-worker-controller.sh Outdated
Comment thread templates/config-repository/scripts/validate.py
@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@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: ea376240d4

ℹ️ 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 templates/config-repository/scripts/init.py Outdated
Comment thread scripts/install-worker-controller.sh
Comment thread scripts/install-worker-controller.sh Outdated
@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@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: c71942afc7

ℹ️ 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 scripts/install-worker-controller.sh Outdated
Comment thread scripts/install-worker-controller.sh
Comment thread scripts/install-worker-controller.sh
Comment thread scripts/install-worker-controller.sh
Comment thread templates/config-repository/scripts/scan_committed_secrets.py Outdated
@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

Please review exact head df5a79c after the latest fixes. Focus on live controller environment/provenance reconciliation, install-state trust repair, all-state managed-runner cleanup for non-active targets, complete committed-content scanning without whole-file exemptions, scoped non-destructive behavior, and final reviewed engine pins. Reproducible image inputs are deliberately tracked in follow-up issue #36.

@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: df5a79cc78

ℹ️ 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 scripts/install-worker-controller.sh
Comment thread scripts/install-worker-controller.sh
Comment thread scripts/install-worker-controller.sh
Comment thread scripts/install-worker-controller.sh
Comment thread scripts/install-worker-controller.sh
Comment thread scripts/install-worker-controller.sh
Comment thread scripts/scan_committed_secrets.py Outdated
Comment thread scripts/install-worker-controller.sh Outdated
@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@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: 548ba9132a

ℹ️ 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 scripts/install-worker-controller.sh
Comment thread scripts/install-worker-controller.sh Outdated
Comment thread scripts/install-worker-controller.sh
Comment thread scripts/install-worker-controller.sh Outdated
Comment thread docs/ADDING-A-HOST.md
@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@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: 4e4b491696

ℹ️ 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 scripts/install-worker-controller.sh Outdated
Comment thread templates/config-repository/fleet.json Outdated
Comment thread scripts/install-worker-controller.sh Outdated
@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@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: 59a8a7a204

ℹ️ 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 scripts/install-worker-controller.sh Outdated
Comment thread docs/CAPACITY-PROMOTION.md Outdated
Comment thread scripts/install-worker-controller.sh Outdated
Comment thread scripts/install-worker-controller.sh Outdated
@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 8365b3de38

ℹ️ 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".

@Nickfost
Nickfost merged commit f5da1fc into main Jul 22, 2026
1 check passed
@Nickfost
Nickfost deleted the agent/git-authored-controller-desired-state branch July 24, 2026 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define Git-authored desired state for fleet controllers and capacity

1 participant