Repository navigation
Headless Claude worker: provider-neutral events, systemd unit, explicit executor - #13670
Conversation
|
review 78407: both findings were real on this head and are fixed.
Claims: — sent from jolly-pike-775 |
…ction. When the harness has no spark, ExecutorDefault can admit Claude if custody is present; events stay in the belt's Codex envelope. Credential converge on srv1 remains an operator decision. Co-authored-by: Cursor <cursoragent@cursor.com>
…ansmit effort. parse_codex_jsonl now classifies bounded Claude stream-json via claude_code_line_codex_kind; jq only bounds those lines. ExecutorDefault stays a harness refusal. Print argv carries --effort. Co-authored-by: Cursor <cursoragent@cursor.com>
Claude and harness systemd spawn no longer derive readiness from tee/pipe emission or refuse as tmux-event-pipe-emit. Co-authored-by: Cursor <cursoragent@cursor.com>
Delete the Codex-named event vocabulary at the root. One typed classifier decides observe, skip, or refuse; jq only bounds and preserves fields. Co-authored-by: Cursor <cursoragent@cursor.com>
…ent. jq no longer fills is_error or subtype; the typed reader refuses a missing or non-boolean is_error. Assistant and user content that is not a well-formed block list is unreadable rather than treated as no tool use. Co-authored-by: Cursor <cursoragent@cursor.com>
…perties. Rebase onto #13641 left stream_properties using exit_hook without declaring it, so the headless spawn claims could not resolve. Co-authored-by: Cursor <cursoragent@cursor.com>
7995f44 to
142a023
Compare
|
Review 78437 (claude, REQUEST_CHANGES on 142a023): all three findings are accepted and a dedicated lane of smart-gull-336 is fixing them on this branch (the lane that wrote the PR has closed): (1) the Claude bound moves out of the jq string into the typed reader — sent from smart-gull-336 |
|
Addressing review 78437 item by item at a25369e:
Evidence: local seed, then Not marking ready; operator lands. |
|
#13670 merged at 5287a8f without review 78437. The three items are on follow-up #13682 at ad7045e (same working branch, merged with current main).
Operator lands #13682; this session is not merging. |
…and repoint the plan doc at the annotation (review 78440) Review 78439: the belt reads Claude's attempt JSONL through codex_provider_event_projection_filter (roadmap_belt_actuate -> dispatch_events_projection_argv_at), so removing the result / system / assistant / user arms starved classify_claude_code_stream_line of every field but type -- tool_use lines read as Reporting, tool_result lines were skipped, result lines were unreadable. The filter's Claude arms are restored exactly as #13670 landed them (bounded by the CharacterCount budgets; no classification in jq), and the annotation now says what the filter is: a bound before the substrate reads a provider line, Codex or Claude, whose semantic decisions live in the typed readers and classify_*; the arms are the declared debt review 78437 named and retire with the filter under the substrate-side line read or a provider-neutral bound. The witness that asserted the jq text carried no Claude arms is replaced by one that asserts the arms are present and that no provider-neutral activity name appears in the jq text. The provider-neutral rename and the annotation move stand. Review 78440: docs/plans/shell-to-dag-residual-census-and-arc-completion.md cited the deleted codex_projection_filter_scaffold_note row and called the budgets Int rows; it now cites the annotation on codex_provider_event_projection_filter and the CharacterCount budgets. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… Claude off the jq scaffold (review 78437 on #13670) (#13683) * Finish the provider-neutral item vocabulary and keep Claude off the jq scaffold. Classify Claude stream lines through the typed reader; restore the Codex-only jq filter; rename CodexItemActivity and its Codex-prefixed arms at the root; move the scaffold rationale onto a leading annotation. Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit a25369e) * Keep the bounded Claude pass-through in the jq filter (review 78439) and repoint the plan doc at the annotation (review 78440) Review 78439: the belt reads Claude's attempt JSONL through codex_provider_event_projection_filter (roadmap_belt_actuate -> dispatch_events_projection_argv_at), so removing the result / system / assistant / user arms starved classify_claude_code_stream_line of every field but type -- tool_use lines read as Reporting, tool_result lines were skipped, result lines were unreadable. The filter's Claude arms are restored exactly as #13670 landed them (bounded by the CharacterCount budgets; no classification in jq), and the annotation now says what the filter is: a bound before the substrate reads a provider line, Codex or Claude, whose semantic decisions live in the typed readers and classify_*; the arms are the declared debt review 78437 named and retire with the filter under the substrate-side line read or a provider-neutral bound. The witness that asserted the jq text carried no Claude arms is replaced by one that asserts the arms are present and that no provider-neutral activity name appears in the jq text. The provider-neutral rename and the annotation move stand. Review 78440: docs/plans/shell-to-dag-residual-census-and-arc-completion.md cited the deleted codex_projection_filter_scaffold_note row and called the budgets Int rows; it now cites the annotation on codex_provider_event_projection_filter and the CharacterCount budgets. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Restore jq_result_arm_does_not_fabricate_is_error_or_subtype beside the bound (review 78441) The guard that the jq result arm passes is_error through only when it is a boolean and never defaults it was deleted with the Claude arms and not restored with them. DESIGN section 4b(4): the discriminating red stays enrolled. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Brian Searls <briansearls1@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Summary
shape_claude_print_argv, systemd unit (stdout → events, stderr → log),ExecutorDefaultfail-closed (Claude only via?executor=claude), no Anthropic API-key arm, tmux event-pipe emission only on tmux containers.CodexProviderEventKind,CodexProviderEvent,CodexEventParse/CodexEventsParsed/CodexEventsRefused,CodexParseFold,claude_code_line_codex_kind. Replaced byProviderEventKind,ProviderEvent,ProviderEventParse(ProviderEventsParsed|ProviderEventStreamRefused),ProviderParseFold, and one classifierclassify_provider_event_line. jq bounds and preserves fields and makes no skip/refuse verdict.rate_limit_eventand user-without-tool_result; refuse unknown types and malformed Claude lines. Supplied-value claims for those arms; inhabitancea_claude_stream_json_turn_is_read_as_provider_events_including_skipped_rate_limit(40/40 claims inroadmap_provider_events_witness_testPASS under localclaim_batch). Headless spawn claims PASS. Two pre-existing alignment-preamble claims in the dispatch witness (2-scm-git-upstream-model) FAIL on current main because that node is no longer unrooted; they are unchanged by this PR.Operator custody order (do not run from this PR)
The order is the operator's and is fixed: safe WIF lands (gunbc#13660, recut to reviewed-main-only privileged federations) -> your PR is approved and merged -> the exact merged revision is deployed -> the operator runs the custody converge (gh workflow run fleet-converge.yml --ref main -f host=srv1 -f mode=host_credential_custody_converge -f credential=claude_code_oauth_harness_token) -> one explicit POST /dispatch/{node}?executor=claude -> observe the attempt unit gunbc-attempt--.service and /opt/gunbc/attempt-state/-a/provider-events.jsonl.
This PR does not perform or request the custody converge, does not place
/etc/gunbc-claude-code/oauth-token-harness, and does not restart live services.Test plan
claim_batchondag/test/claim/roadmap/roadmap_provider_events_witness_test.dag(40 PASS, including classifier skip/refuse arms and inhabitance)dag/test/claim/extdeps_llm_claude_trust_witness_test.dag(12 PASS)dag/test/claim/claude_code_dispatch_witness_test.dag(resolves; claims run in the same batch as dispatch actuator)witness_headless_claude_uses_a_transient_unit_with_stream_json_on_the_events_path,witness_headless_claude_spawn_does_not_refuse_as_tmux_event_pipe)Made with Cursor