feat: governance provenance types and history formatting - #824
Open
davidmiuraactualai wants to merge 5 commits into
Open
feat: governance provenance types and history formatting#824davidmiuraactualai wants to merge 5 commits into
davidmiuraactualai wants to merge 5 commits into
Conversation
Add ProvenanceEventType enum (11 event types), ProvenanceEvent struct, ProvenanceChainResponse, and format_governance_history function for displaying ordered provenance chains. 5 new tests covering serde round-trips and history formatting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replaces the old start_advisor_query + poll_to_completion path with a single sync post_intervention call. The CLI now sends a UserPromptSubmit event through the intervention pipeline, matching how observer hooks deliver architecture guidance. Removes dead code: POLL_PATH, START_BODY, MAX_RETRY_AFTER, Outcome enum, next_delay, print_answer, and tests that exercised the removed functions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ctual-end/> Two features: 1. `actual observe setup --localhost` bakes ACTUAL_AUTH_URL/ACTUAL_API_URL env vars into hook commands so all hook invocations hit local services. 2. Stop-hook loop prevention: the advisor response includes <actual-end/>, and the CLI sets a per-session stop_ack flag that suppresses subsequent Stop hook evaluations until real work (PreToolUse/boundary) occurs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wCALDeVcpBedCJ7gdKUo5
observe setup now resolves the repo's unique ID by matching the git remote origin URL against the org's connected repos via the API, then persists it in sticky_repo_scope. Subsequent hook invocations send repo_unique_id instead of null, enabling repo-scoped ADR search. - exec_setup calls try_resolve_and_persist_scope after installing hooks - Respects --localhost flag for API URL selection - Exposes parse_git_remote_url, match_remote_to_repos, RepoRemote as pub(crate) from advisor.rs for reuse in observe.rs - Adds resolve_repo_unique_id_from_events to read sticky scope during hook invocations (was previously hardcoded to None) - Degrades gracefully: if resolution fails, hooks still work at org level Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XpoJGi6P75oHz33j5FAhj8
Default `actual observe setup` now installs only 5 hooks (SessionStart, UserPromptSubmit, PreToolUse[ExitPlanMode], Stop, SessionEnd) for lower overhead. Use `--hook-all` to include per-tool-use, post-tool, pre-compact, and subagent hooks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XpoJGi6P75oHz33j5FAhj8
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
actual governance historydisplayTest plan
🤖 Generated with Claude Code