Commit Graph

60 Commits

Author SHA1 Message Date
joshp123
280744ce0c infra: slim clawdinators aws footprint
What:
- bound CLAWDINATOR image artifact retention with S3 lifecycle, AMI pruning, and import provenance tags
- reduce the AWS fleet to Babelfish-only and make GitHub credentials opt-in per host
- disable the AMI build, nix-openclaw bump, and release workflows by moving them out of .github/workflows/
- update operator docs for the new explicit build and deploy model

Why:
- stop unbounded S3 and snapshot growth from image builds
- remove unattended resurrection paths and shut down the unused t3.large instances
- keep the remaining Babelfish host running without GitHub App credentials or sync timers

Tests:
- `nix shell nixpkgs#shellcheck nixpkgs#shfmt -c bash scripts/lint-shell.sh` (pass)
- `nix build .#nixosConfigurations.clawdinator-babelfish.config.system.build.toplevel .#nixosConfigurations.clawdinator-1.config.system.build.toplevel .#nixosConfigurations.clawdinator-2.config.system.build.toplevel` (pass)
- `AWS_PROFILE=homelab-admin TF_VAR_aws_region=eu-central-1 TF_VAR_ami_id=ami-0a9abe17feeee0079 TF_VAR_ssh_public_key="$(cat ~/.ssh/id_ed25519.pub)" nix shell nixpkgs#opentofu -c sh -lc 'tofu fmt -check && tofu validate'` (pass)
- live AWS apply: destroyed `clawdinator-1` and `clawdinator-2`, replaced Babelfish, and verified only `Fleet Deploy` remains active in GitHub Actions
2026-04-03 15:38:57 +02:00
joshp123
33755bec7a 🤖 fix: remove inline remote deploy logic from fleet switch
What:
- move host-side nixos switch + revision verification into scripts/remote-fleet-switch-host.sh
- update scripts/fleet-switch-nixos.sh to fetch and execute the committed remote script at the target git rev
- keep canary host loop behavior unchanged while eliminating inline remote bash payload logic

Why:
- prevent local shell interpolation bugs in deploy assertions
- align deploy flow with repo rule: put logic in script files and call them
- make host-side deploy verification easier to audit and reason about

Tests:
- nix shell nixpkgs#shellcheck nixpkgs#shfmt -c sh -c "find scripts -type f -name *.sh -print0 | xargs -0 shellcheck -S warning && find scripts -type f -name *.sh -print0 | xargs -0 shfmt -i 2 -ci -sr -d"
2026-02-16 08:59:22 -08:00
joshp123
833264bbe3 Make seed-workspace resilient to permission drift
Retry rsync without --delete on exit 23 so the gateway does not crash-loop if workspace contains root-owned files.
2026-02-15 17:15:12 -08:00
joshp123
6cd6b7fada Fix jq precedence in fleet-status
Wrap defaulting expression in parentheses so jq parses correctly.
2026-02-15 17:13:09 -08:00
joshp123
52f5168cd2 Add shellcheck + shfmt linting for scripts
Add CI workflow to run shellcheck + shfmt, plus a scripts/lint-shell.sh helper.

Also apply shfmt formatting and fix initial shellcheck warnings.
2026-02-15 15:51:40 -08:00
joshp123
c44d54319e Stamp deploy time and enrich version output
After nixos-rebuild switch, write /var/lib/clawd/deploy/last-switch.{time,rev}.

clawdinator-version now optionally fetches OpenClaw commit date via GitHub API when gh is authenticated.
2026-02-15 15:47:39 -08:00
joshp123
eb3c79c5f5 Add version introspection tool + build info
Expose pinned component revs via /etc/clawdinator/build-info.json and ship a clawdinator-version helper script (logic lives in scripts/, not inline in Nix).

This supports fleet consistency checks and maintainer introspection.
2026-02-15 15:45:00 -08:00
joshp123
e126e33d54 Stamp deployed revision and verify after switch
Set system.configurationRevision from flake rev and have fleet switch verify it matches the deployed git SHA.
2026-02-15 15:31:39 -08:00
joshp123
e549dca9fd Fix SSM send-command quoting
Pass commands via JSON to avoid AWS CLI argument parsing issues.
2026-02-15 15:30:01 -08:00
joshp123
9245311395 Add fast release pipeline (bootstrap + SSM nixos-rebuild)
- Add release.yml: eval -> upload bootstrap -> deploy via SSM (canary order)
- Make image-build manual/weekly (base AMI lane)
- Add SSM permissions to CI IAM policy (requires tofu apply)
- Add scripts for SSM-based nixos-rebuild and docs for the two-lane model
2026-02-15 15:22:27 -08:00
joshp123
ffb27ab614 Public PR intent S3 bucket + publisher timer
- Provision public S3 bucket (anonymous list/get) for PR intent artifacts
- Grant instance role PutObject and add NixOS systemd timer to publish /memory/pr-intent
- Default agent thinking level to high for GPT-5.2/Codex
- Make OpenTofu instance management explicit (manage_instances) to prevent accidental fleet destroy

Tests: not run (infra/Nix changes)
2026-02-15 12:44:11 -08:00
Josh Palmer
0445635ae6 infra: rebootstrap on prefix change
- record bootstrap prefix in secrets dir

- reset secrets when prefix differs
2026-02-03 18:27:30 -08:00
Josh Palmer
1384ee7b47 infra: restore ec2 user-data fetch
- add fetch-ec2-metadata service for AMI bootstrap

- set git safe.directory for nixos-rebuild

- note clawdinator-2 recovery in ops
2026-02-03 16:36:21 -08:00
Josh Palmer
e869c7b5a7 fix: move fleet status local
- drop AWS SDK from control api
- fetch status via AWS CLI in fleet control
- update control plane docs
2026-02-03 12:46:41 +01:00
Josh Palmer
4fd6ab11e4 feat: control api invoke creds
- add lambda invoke IAM user + outputs
- update fleet control to invoke lambda directly
- wire new control access-key secrets
- update docs + secrets guidance
2026-02-03 11:10:39 +01:00
Josh Palmer
8e5f256e96 fix: control api auth header
- use X-Clawdinator-Token header for lambda url
- update fleet control script + docs
- adjust control api archive path
2026-02-03 10:43:27 +01:00
Josh Palmer
05d43b1926 infra: add fleet control api + multi-instance
- add control API Lambda + fleet deploy workflow
- introduce instances registry + common host config
- add fleet control skill + scripts
- update bootstrap bundles + secrets docs
- wire OpenTofu for multi-instance + user-data
2026-02-03 01:20:23 +01:00
Josh Palmer
8f2cf7a58d Switch pi defaults to OpenAI API provider
- set pi default provider to openai for API key auth
- stop writing openai-codex into auth.json

Tests: manual
- pi -p --provider openai --model gpt-5.2-codex "ping"
- pi -p --provider anthropic --model claude-opus-4-5 "ping"
2026-02-02 17:22:25 +01:00
Josh Palmer
fbd6dc2118 Seed pi auth.json from agenix keys
- add pi-auth script to build auth.json at runtime
- wire clawdinator-pi-auth service after agenix

Tests: not run (config/script only)
2026-02-02 17:08:44 +01:00
Josh Palmer
be9f5fada8 refine: landpr flow to single approval gate
- default to rebase unless squash requested
- avoid dumping checklist; treat as playbook
- add single approval gate before rebase/force-push/merge
2026-02-01 17:15:33 +01:00
Josh Palmer
9a4d467f05 feat: add /landpr skill + checklist
- add landpr workspace skill to expose /landpr command
- add scripts/landpr.md checklist for OpenClaw PR landings
2026-02-01 17:10:24 +01:00
Josh Palmer
c2c3bf4f46 🔄 rebrand: moltbot → openclaw, clawdinators
Rename org references from moltbot to openclaw across all config, docs,
CI workflows, flake inputs, secret names, and repo seeds.

Mapping:
- org: moltbot → openclaw
- repos: moltinators → clawdinators, nix-moltbot → nix-openclaw, molthub → clawhub
- secrets: moltinator-* → clawdinator-*
- flake input: nix-moltbot → nix-openclaw
- GH repos renamed: openclaw/nix-openclaw, openclaw/clawdinators

Upstream package/binary names (moltbot, moltbot-gateway, moltbot.json)
kept as-is — those come from nix-openclaw and haven't been renamed yet.

Tests: not run (rename-only change; CI will validate flake eval)
2026-01-30 14:30:46 +01:00
Josh Palmer
b9b3ad6ffe 🤖 ops: sync openclaw org
Set githubSync org default to openclaw and override on clawdinator-1.
Make gh-sync headers reflect configured org.

Tests: not run (config change)
2026-01-30 12:15:37 +01:00
Josh Palmer
78f57df5a8 🤖 chore: move to moltbot upstream + sync tooling
What:
- swap nix-moltbot inputs, packages, and workflow automation
- update secrets wiring, repo seeds, and org references for moltbot
- fix self-update path and moltbot config/log defaults

Why:
- align infra with moltbot rename and new packaging
- restore update pipeline + consistent bootstrap artifacts

Tests:
- ./scripts/build-image.sh (fails: /build chmod permission on darwin)
2026-01-28 18:36:10 +01:00
Josh Palmer
a809f29154 fix: tolerate missing agenix secrets in image build 2026-01-10 19:00:07 +01:00
Josh Palmer
a7106d3072 Move secrets + repo seeds to runtime bootstrap 2026-01-10 17:04:18 +01:00
Josh Palmer
cdf5c4a4fb fix(lurk): align discord memory + locks 2026-01-09 01:42:49 +01:00
Josh Palmer
a7e0c038e1 Bake repo seeds into image build 2026-01-08 23:21:58 +01:00
Josh Palmer
ad4c644110 Make seed-repos resilient to single repo failures 2026-01-08 23:10:52 +01:00
Josh Palmer
1ddf597e2f Normalize repo origin URLs before fetch 2026-01-08 22:05:53 +01:00
Josh Palmer
1ef5b556b0 Fix EFS memory permissions and expose memory tools 2026-01-08 19:11:35 +01:00
Josh Palmer
1403e0b408 Fix workspace seeding permissions 2026-01-08 18:21:06 +01:00
Josh Palmer
8766cc9588 Seed workspace dirs and harden github sync 2026-01-08 17:54:35 +01:00
Josh Palmer
557c9d411d 🤖 Add triage skill + GitHub sync for maintainer bot
What:
- Add `triage` skill for Now/Next/Later priority summaries
- Add `gh-sync.sh` script to fetch PRs/issues from clawdbot org
- Add systemd timer for periodic GitHub sync (every 15 min)
- Add `memory/github/` directory for synced state

Why:
- Enable maintainer bot to surface clear recommendations
- ZFC-compliant: script does pure IO, AI does all reasoning
- Real-time-ish data via periodic sync to shared memory

Skill triggers: "triage", "priorities", "what's hot", "status"
Output: Now/Next/Later buckets with links + recommended actions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 17:54:25 +01:00
Josh Palmer
231f0a8cee Pass secrets dir into image build 2026-01-08 16:59:43 +01:00
Josh Palmer
a189f7bfbe read age key from env for image build 2026-01-08 16:17:45 +01:00
Josh Palmer
5478b2acc5 fix impure flag and drop disko lock 2026-01-08 16:14:56 +01:00
Josh Palmer
b6bdf289c1 build image with impure inputs 2026-01-08 16:12:36 +01:00
Josh Palmer
98f9d6e47b build image via flake config 2026-01-08 16:05:29 +01:00
Josh Palmer
4c2d2fb6b7 use basic auth for github app git 2026-01-08 15:07:48 +01:00
Josh Palmer
f30534e69a harden repo seeding updates 2026-01-08 15:06:26 +01:00
Josh Palmer
7ede0904a5 auth repo seeding with github app token 2026-01-08 15:00:49 +01:00
Josh Palmer
fe0b471ee8 Document toolchain propagation and auto-seed tools 2026-01-08 14:33:05 +01:00
Josh Palmer
d787dc98ed Add EFS shared memory and locking tools 2026-01-08 13:43:56 +01:00
Josh Palmer
958bf7aee6 Seed workspace templates and repos on startup 2026-01-08 13:25:51 +01:00
Josh Palmer
4b2399ea34 Switch AMI import to snapshot workflow 2026-01-08 00:11:22 +01:00
Josh Palmer
8da1628d93 Add AWS instance provisioning and raw image bootstrap 2026-01-07 23:48:32 +01:00
Josh Palmer
504a3eec1a Fix image build to handle nix out-link 2026-01-07 23:06:21 +01:00
Josh Palmer
2a40dbb15b Harden AWS image pipeline and cleanup host config 2026-01-07 23:00:21 +01:00
Josh Palmer
50f40166ba Use amazon image format for AMI import 2026-01-07 22:39:50 +01:00