Commit Graph

5 Commits

Author SHA1 Message Date
Bo 189bc81867 feat(gc): 3.3 flow is the mayor-driven door — human or agent orchestrated (#985)
## What

The 3.3 GC pack flow becomes Gas City's native human door, drivable by
humans and agents alike (operator decision). Five commits:

1. **a903c23f8** `feat(gc)`: Mayor prompt rewritten observe-only →
**shepherd** — polls external rigs' ready step beads and dispatches each
via `gc sling <gc.run_target> <bead> --nudge`. Never claims, never
authors, never closes.
2. **e58aeb5cb** `feat(gc)`: `invoke.sh mayor start|status|tell` — the
agent control surface over native primitives (`gc session wake`, `gc
session list --json`, `gc mail send --notify`; mail chosen over
sling-text to avoid v1.3.5's inline-text auto-create). Mayor is now a
`mode=always` standing session.
3. **bd8c34df6** `docs(gc)`: README — two doors (human attaches, agent
drives via mail), heartbeat propulsion, #4586 context.
4. **2b6ffe9cf** `feat(gc)`: `skills/using-gc` rewritten as the
mayor-orchestration skill (drive loop, bead-ids-only doctrine, GC
liveness truth stack with both codex wedge classes, stall protocol) +
all regenerated projections.
5. **362f4af79** `fix(gc)` (cross-family review: 1 BLOCKER + 5 MAJORs,
all fixed): **shepherd-heartbeat order** (native `gc order`, 3m cooldown
— mode=always keeps the Mayor resident but nothing re-prompts it; the
order is the liveness engine); HQ filtered from rig enumeration; stall
recovery = `session wake` (re-sling documented as a no-op for routed
beads); `mayor status` tri-state fail-closed; mail authority limited to
dispatch/status with bodies treated as untrusted data (pause/resume
dropped — stateless under fresh wake); test stubs reject non-allowlisted
verbs.

## Why

On v1.3.5, demand-driven worker spawning never fires for rig-routed work
(upstream gastownhall/gascity#4586, ours, with a stock-pack no-LLM
repro). Shepherd-dispatch by a standing Mayor is both the
v1.3.5-functional propulsion path AND the stock-GC operating pattern
(their mayor prompt: create → sling bead-id → monitor) — so this flow
survives the upstream fix rather than fighting it. Intent stays
caller-owned: drivers hand the Mayor bead IDs, never prose work.

## Verification

- `tests.python.test_gc33_thin_pack`: 34 passed (2 integration-gated
skips)
- `shellcheck -S warning` + `bash -n` clean; `scripts/regen-all.sh
--check`: all 11 projections current
- Every gc primitive verified against v1.3.5 source (cmd_mail.go,
cmd_session_wake.go, cmd_sling.go, cmd_rig.go, decode_sessions.go,
orderdiscovery)
- Codex adversarial review round: all findings fixed
- **Not yet proven live**: heartbeat-order discovery/scheduling,
mode=always residency, wake-based recovery, end-to-end propulsion — the
live canary follows this merge.
2026-07-23 17:08:28 +00:00
Bo 31e81f09d7 fix(gc): route pack intake through rig-scoped dispatch (official GC pattern) (#984)
## Why

Verified against GC v1.3.5 source + docs: the stock Mayor **dispatches
and never claims** (mayor.md prompt, swarm example, reference
mayor-dispatch.sh); the blessed single-bead intake is `gc sling
<rig>/<agent> <bead> --on <formula>`, with claims happening rig-scoped —
the byte-for-byte unchanged-safe path on v1.3.5. Our pack inverted this
by slinging to the city-scoped `agentops.mayor`, which is exactly (and
only) the shape that hits the v1.3.5 cross-store claim defect. This
aligns intake with the official pattern: the loop works on official
v1.3.5 binaries, beads stay rig-homed and git-synced.

## What

1. **4f31a35e6** `fix(gc)`: `invoke.sh feed` slings to
`<rig>/agentops.plan-reviewer --on agentops-experiment` with rig-scoped
role vars; new `invoke.sh create` writes the work bead into the rig
store via the pinned bd against the managed Dolt server; Mayor demoted
to optional observe-only coordinator (explicit do-not-claim); refiner
rework path re-pointed off the Mayor. Static proof: zero
`agentops.mayor` routing left; the only executable sling targets the rig
role.
2. **e766d05a5** `docs(gc)`: README default flow = create → feed →
observe → refine → teardown on the official pattern; cross-store claim
bug demoted to "not exercised by the default flow"; preview label +
promotion criteria unchanged.
3. **ae7664496** `fix(gc)` (from cross-family review — 1 BLOCKER + 4
MAJORs, all fixed): executable provenance anchored to the pack's own
lock/receipt chain instead of the mutable marker; re-bootstrap now
detects stale toolchain paths/digests; feed verifies the bead exists
exactly before sling (v1.3.5 `gc sling` auto-creates a task from unknown
text — a typo would have dispatched garbage); Mayor observe surface uses
`gc rig list` + per-rig `gc bd --rig N ready/blocked` (bare city reads
miss rig work); test stubs record exact argv under space-containing
paths, guards proven to bite.

## Verification

- `tests.python.test_gc33_thin_pack`: 23 run, OK (2 integration skips —
need booted city)
- `shellcheck -S warning deploy/gc/*.sh`: clean; `bash -n` all scripts
- Codex adversarial review round: all findings fixed
- **Not yet proven live**: the full booted-city flow (`--nudge` wake,
formula execution, refine landing). That is the immediate next phase — a
dogfood run sending the RPI human-summary bead through a real city on
official v1.3.5.
2026-07-23 03:31:15 +00:00
Bo 5856fcf390 fix(gc): fetch official toolchain archives and label pack preview (#983)
## What

Three commits executing the official-artifacts-only GC pack release
path:

1. **c07d10d66** `fix(gc)`: `materialize-toolchain.sh` now downloads the
official gastownhall/gascity v1.3.5 and steveyegge/beads v1.1.0 release
archives instead of compiling from source. Fail-closed verification
chain: lock-pinned sha256 of the official checksums asset → archive
sha256 against the verified checksums file → installed binary must
report the locked version/commit. Users need curl+tar+shasum; no
git/make/compiler. Offline test mode via `AGENTOPS_GC_ARCHIVE_CACHE`
with the identical verification path.
2. **95e83f8d8** `docs(gc)`: README labels the pack **preview** and
discloses the two v1.3.5 upstream defects: the default automated
feed→claim loop fails deterministically (city-scoped Mayor claims a
rig-fed bead against the city store → `bead not found`; fixed upstream
in a135117945e2/3fa9bb38e916, arrives at the next official release) and
the rare tmux teardown hang (upstream PR gastownhall/gascity#3985).
Preview → supported after the next official pin bump, deterministic
qualification, and one clean canary.
3. **0318a2429** `test(gc)`: negative tests proving the binary
version/commit binding fails closed (added after cross-family review
found the guard untested; verified the tests fail when the guard is
neutered).

## Verification

- `python3 -m unittest tests.python.test_gc33_thin_pack`: 17 tests, 15
pass + 2 integration skips (need materialized GC_BIN)
- Live network run: downloaded, checksum-verified, and version-bound
both official binaries (gc 1.3.5 @ 8ffc009d…, bd 1.1.0 @ 8e4e59d39…)
- `shellcheck -S warning deploy/gc/*.sh` clean
- Cross-family (Codex) adversarial review: 1 MAJOR found → fixed in
commit 3; no fail-open findings in the verification chain

## Scope

`deploy/gc/materialize-toolchain.sh`, `deploy/gc/README.md`,
`tests/python/test_gc33_thin_pack.py` only. No fork artifacts, no lock
change — pin stays official v1.3.5.
2026-07-23 02:06:13 +00:00
Bo 38932fd989 fix(gc): bind pinned lifecycle and drain teardown (#982)
## Outcome

Repairs the single lifecycle boundary exposed by the first post-merge
AgentOps Gas City canary.

- Exports the exact marker/toolchain-bound `GC_BIN` from bootstrap,
invoke, and teardown before official GC behavior.
- Uses official `gc stop --force`, then stops the private supervisor.
- Waits up to the declared timeout for processes scoped to the exact
canonical city root to drain.
- Reports the exact remaining process rows on timeout.

No GC/BD fork change, role/formula/model change, new daemon, or
live-city repair is included.

## Evidence

- Focused regressions: 2/2 passed.
- ShellCheck warning severity: passed.
- Thin-pack gate against pinned GC: 11 tests passed, 2 expected skips.
- Exact pinned native integration: 11/11 passed in 115.638s.
- Subject manifest:
`3d9a7816ed6807f843fd805e0462a16ff9589eb9a3a0b572da4d4039d5ed319a`.
- Fresh Sol-high verdict: PASS,
`230bd8e56d29bcf926ef772b749d1fb9c1f7550a92ccb6f6653630ddfdad1c4c`.
- Validated candidate head: `fe5a1248fa9eaa97aa6bc97f86d551c5bdbbd66c`.

## Release boundary

Hosted CI and one wholly fresh terminal mixed-provider canary remain
required after this repair merges. There will be no third canary or
in-city repair loop.
2026-07-22 19:38:27 -04:00
Bo cbe7ddbb5f feat(gc): ship thin native AgentOps factory pack (#980)
## Outcome

Ships AgentOps 3.3 as a thin native Gas City pack and removes the
accidental second orchestration control plane.

- Removes the custom GC delivery command/package, packet/schema family,
feeder/program engine, reducer/order, reliability registry, Beads
capability mirror, and fork-baseline runtime checks (about 29k deleted
lines).
- Retains six bounded adapters for pinned toolchain materialization,
clean bootstrap, native sling/status/doctor invocation, bead-isolated
worktrees, moving-main PR delivery, and teardown.
- Uses official Gas City and Beads behavior as the state owners, with
required OTEL configuration.
- Preserves Fable Mayor/Refiner, Sol-high planning and fresh validation,
Terra-high default implementation, Opus-medium overflow, and
support-only Luna.
- Supports automatic Refiner merge after hosted CI or a manual-review
toggle without locking `main`.

## Evidence

- Exact official GC: `8ffc009ded781a2ada2077f3a29bd712b2def0bf`
- Exact official BD: `8e4e59d39f3459a43cf21a3236a13eca4dd874f7`
- Full pinned native boundary: 9/9 passed in 114.047s
- Exact source-bead route replay: passed in 98.051s
- Release replay: manifest integrity, thin tests and both pack lints,
generated projections, contract compatibility, Bats contract,
ShellCheck, test-removal ratchet, and `go test ./...` all passed
- Fresh independent semantic verdict: PASS (Sol-high)
- Exact delivered head: `e805f0e26ce21c2eae9e720f57fff2a705f3185b`
- Subject manifest:
`8554d065076f70d0e639ca353409d2a75dca7ac01e4cb65cb4a118e98c0770fc`
- Verdict:
`3f89376b675de854832f38b46ccfa7ad7ca54079ffde578769c33e1f118c68c1`

## Release boundary

After this PR merges, the release qualification runs one fresh mixed
Terra/Opus canary from merged `main`, with at most one external repair
and one terminal retry. No live city repairs itself.

The only known local fast-gate exception is `workflow.install-drift`:
the installed workflow symlink resolves to the separate dirty primary
checkout, outside this candidate. All candidate-owned gates passed.
2026-07-22 19:08:02 -04:00