[codex] handle gc v1 readiness items shape#189
Merged
Conversation
Adds Items map + IsReady()/EffectiveStatus() helpers to gascity.ReadinessResponse
so the agentopsd worker accepts both the legacy {ready,status,...} shape and the
gc v1.0.0+ {items:{...}} shape served by the public Gas City supervisor.
Discovered while wiring agentopsd to a brew-installed gc 1.0.0 supervisor
(bushido WSL, 2026-04-29): the worker rejected every job with 'gascity city
"bushido" not ready' because the supervisor returns providers.items, not a
top-level ready bool. With this change readiness passes for any city that has
at least one provider in 'configured' or 'ready' status and no item in
'degraded'/'error'/'unavailable'.
Tests: TestReadinessResponseIsReadyBothShapes covers legacy + v1 + partial +
empty + degraded-blocking cases.
Follow-up (NOT in this commit): gc v1.0.0 also rejects unknown session-create
options keys, blocking the next step in the agentopsd→gascity flow. Either
agentops should namespace its metadata keys, or gc should accept them; needs
upstream coordination. Tracked in bd issue (filed sibling).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
itemssupport togascity.ReadinessResponsewhile keeping the legacy top-level readiness fields.IsReady()andEffectiveStatus()helpers so the worker no longer treats gc v1 readiness responses as false zero-values.Why
When agentopsd is configured with
--executor-policy=gascity, gc v1.0.0 returns/v0/city/<name>/readinessas anitemsmap instead of the older top-level{ready,status,...}shape. The worker decoded that intoReady=falseand refused every job before creating a GasCity session.Scope
This is intentionally limited to Drift 1 from the 2026-04-29 handoff. It does not change session-create options handling; the gc v1 unknown-options contract drift is tracked separately in
soc-6hgw.Validation
git diff --check main...HEADgo test ./internal/gascity ./internal/agentworkerfromcli/go vet ./internal/gascity ./internal/agentworkerfromcli/make -C cli buildgit pushpre-push fast gate passed