Skip to content

feat(api): mirror the control status into the enriched feed (#346) - #358

Merged
VijitSingh97 merged 2 commits into
developfrom
feat/346-control-status-mirror
Aug 15, 2026
Merged

feat(api): mirror the control status into the enriched feed (#346)#358
VijitSingh97 merged 2 commits into
developfrom
feat/346-control-status-mirror

Conversation

@VijitSingh97

Copy link
Copy Markdown
Contributor

The enriched feed carried config_meta provenance but no control outcome — so a pithead dashboard whose host poll expired never learned a rollback's terminal state and showed "accepted" forever. _api_rigforge_block now carries control: {change_id, status, reason} read from the control state file (already world-readable), null on absent/unreadable/malformed — the feed can never break on control-state problems. Non-terminal started/accepted pass through; pithead filters to terminals.

Tests: sister-API sections for present/absent/malformed state. Consumer contract verified against pithead's parse_worker_control_status (16-hex change_id, terminal vocabulary). Pairs with pithead#1001 (its pollers learn noop/throttled/failed) and closes the loop pithead docs/workers.md documents as missing.

Closes #346

🤖 Generated with Claude Code

VijitSingh97 and others added 2 commits August 14, 2026 19:34
Pithead's host runner caps its synchronous /status poll after a
worker-apply at 20s, but control-apply's auto-rollback can take minutes —
the change-history row froze at 'accepted' with no way to catch up short
of a new authenticated dial to the rig's control port (a token the
dashboard container never holds).

The rig now mirrors its own last outcome into the already-open read feed:
_api_control_json reads {change_id, status, reason} from the status.json
_control_status already writes 0644, and _api_rigforge_block serves it as
rigforge.control. Missing, unreadable, or malformed status.json degrades
to control: null — the mirror can never break the feed — and pithead's
parse_worker_control_status filters non-terminal records itself.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VijitSingh97
VijitSingh97 merged commit b43832f into develop Aug 15, 2026
9 checks passed
@VijitSingh97
VijitSingh97 deleted the feat/346-control-status-mirror branch August 15, 2026 04:18
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.

Enriched feed ships no control status mirror — dashboard-side rollbacks slower than the host poll stay 'accepted' forever

1 participant