feat(api): mirror the control status into the enriched feed (#346) - #358
Merged
Conversation
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>
…tatus-mirror # Conflicts: # CHANGELOG.md
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.
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_blocknow carriescontrol: {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-terminalstarted/acceptedpass 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