Skip to content

caos-cli: remove /pr, /publish-branch and the client publisher - #302

Merged
nishu-builder merged 6 commits into
claude/upbeat-lovelace-1xy4qn-github-toolfrom
claude/upbeat-lovelace-1xy4qn-remove-pr
Oct 5, 2026
Merged

nishu-builder merged 6 commits into
claude/upbeat-lovelace-1xy4qn-github-toolfrom
claude/upbeat-lovelace-1xy4qn-remove-pr

Conversation

@nishu-builder

@nishu-builder nishu-builder commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Third of three, stacked on #301 (std/github), which sits on #300 (the design). Net about −2,400 lines.

The agent publishes now: publish_source pushes the commit from the server's store, and caos-std/github opens or updates the PR. This removes the client's own route to the same end. With it goes the client's need for gh, a host-side git push, and a local copy of the history it publishes.

Removed

  • TUI: /pr and /publish-branch; the preview modal and its key and mouse handling; the publishing state and its status, sidebar and footer rendering; and the PublicationPlanned, Published and PublicationBaseImported messages (bin/tui/publication.rs).
  • src/publication.rs: gh pr create / gh pr edit.
  • source_trees.rs: the publication half: preview, provenance inference, base import, default_branch, branch_snapshot.
  • host_git.rs: the PR half.
  • lib.rs: the client push (publish_source_tree_branch and friends), reject_publish_caos, publication_diagnostic, PublishedBranch, and append_system_notice, which only the publisher called.
  • Their tests.

Kept

  • Publication records stay readable. The agent's publish_source still writes them, and conversation_load still summarizes them. A new test appends one the way llm-step does and loads it back.
  • Two escape-key tests lose their publishing cases and keep the running ones.

Docs

  • chat.md's "Publishing with /pr" becomes a short "Publishing" section pointing at publish_source and caos-std/github.
  • TUI.md, SPEC.md ("Publication"), README.md and agent-harness.md drop the commands.
  • Following the review on design: PRs through a std/github tool, not gh or /pr #300, SPEC.md and TUI.md no longer say a .caos entry blocks publication: nothing checks for it at publish time.

Testing

  • cargo test -p caos-cli: 39/39 lib tests and 148/150 bin tests pass. The two failures are plain_commit_fork_failure_never_becomes_a_markerless_conversation and checkout_import_completes_partial_history_and_keeps_local_edits. They fail the same way on std/github: interact with PRs and stacks through github api #301's head, without this change, on this machine's git 2.43: one on a promisor lazy fetch, one on a git error message.
  • cargo clippy -p caos-cli --all-targets -- -D warnings and cargo fmt --all --check are clean.
  • Not run: the caos suite and nix build. They need flake inputs from GitHub repos this session couldn't reach. The release workflow's nix build .#caos-cli on push covers the client build.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CZGkTta5NYxhXcLPZwH3q1

The agent publishes now: publish_source pushes the commit from the
server's store and the github tool opens or updates the PR
(design/agent-github.md, "PRs"). The client's own path to the same end
goes, and with it the client's need for gh, a host git push, and a
local copy of the history it publishes.

Removed:
- TUI: the /pr and /publish-branch commands, the preview modal and its
  key and mouse handling, the publishing state and its status, sidebar
  and footer rendering, and the PublicationPlanned, Published and
  PublicationBaseImported messages (bin/tui/publication.rs).
- Library: src/publication.rs (gh pr create/edit), the publication
  half of source_trees.rs (preview, provenance inference, base import,
  default_branch, branch_snapshot), the PR half of host_git.rs, and in
  lib.rs the client push (publish_source_tree_branch and friends),
  reject_publish_caos, publication_diagnostic, PublishedBranch, and
  append_system_notice, which only the publisher called.
- Their tests.

Kept: publication records stay readable. The agent's publish_source
still writes them, and conversation_load still summarizes them; a new
test appends one the way llm-step does and loads it back. Two escape
key tests lose their publishing cases and keep the running ones.

Docs: chat.md's "Publishing with /pr" becomes a short "Publishing"
pointing at the agent's tools; TUI.md, SPEC.md ("Publication"),
README.md and agent-harness.md drop the commands.

cargo test -p caos-cli: 39/39 lib, 148/150 bin. The two failures,
plain_commit_fork_failure_never_becomes_a_markerless_conversation and
checkout_import_completes_partial_history_and_keeps_local_edits, fail
identically without this change on this machine's git 2.43 (a promisor
lazy fetch, and a git error message). cargo clippy -p caos-cli
--all-targets -- -D warnings and cargo fmt --all --check are clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CZGkTta5NYxhXcLPZwH3q1
claude added 4 commits October 5, 2026 06:41
Follows the review on #300, now merged in: the GitHub caller is the std
tool caos-std/github, and publication has no conflict check. SPEC.md,
chat.md and TUI.md name the tool, and SPEC.md and TUI.md no longer say
a .caos entry blocks publication: resolving a conflict clears its entry
and saving removes the emptied ledger, so one left in a published commit
is an unresolved conflict, like code that does not build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CZGkTta5NYxhXcLPZwH3q1
@nishu-builder
nishu-builder added this pull request to stack #306 October 5, 2026 07:30
…thub-tool' into claude/upbeat-lovelace-1xy4qn-remove-pr
@nishu-builder
nishu-builder merged commit 10fb0b1 into main Oct 5, 2026
2 checks passed
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.

2 participants