Skip to content

Add caos push-git - #251

Merged
nishu-builder merged 1 commit into
codex/publish-endpoint-20260917-911f8baefrom
codex/publish-cli-20260917-911f8bae
Sep 18, 2026
Merged

nishu-builder merged 1 commit into
codex/publish-endpoint-20260917-911f8baefrom
codex/publish-cli-20260917-911f8bae

Conversation

@nishu-builder

@nishu-builder nishu-builder commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Add caos push-git --expected=<hash|absent>. Reuse import credentials and HTTP transport; preserve the pinned commit and destination in every receipt.

Render known server error codes instead of arbitrary response text. Local preparation failures exit before dispatch; after dispatch, a missing, malformed or unconfirmed response produces an uncertain receipt. The fixture covers publication, receiver/validation rejection and invalid local inputs.

Validation on EC2: Nix build passed. The salted suite passed 46/47 checks in 395s; its Clippy findings were fixed, and Clippy passed on all affected crates with --all-targets -- -D warnings. Formatting passed after those lint-only fixes. HTTPS import/push, shallow-locator/offline-cache, and focused unit checks also passed. The functional suite was not repeated for the lint-only changes.

@nishu-builder nishu-builder left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layer 4/8. Small and does what it says: shared send, strict argument parsing, absent spelled explicitly, response shape validated before it is echoed, and the CLI cases in the fixture. Timeout raised to 960s while the server's own git call is capped at 300s, which is fine as long as that ordering is deliberate.

One inline comment: mapping every 422 to a single validation-rejected diagnostic throws away the distinction the server already makes (reserved .caos, markers, conversation commit, not-a-fast-forward, E not stored), and the agent's next action differs for each. A marked JSON body from the server would let the CLI surface the reason without trusting arbitrary proxy text.


Generated by Claude Code

Comment thread rust/crates/caos/src/push_git.rs Outdated
@nishu-builder
nishu-builder force-pushed the codex/publish-cli-20260917-911f8bae branch from 0dea08e to b9f22d0 Compare September 18, 2026 00:03
@nishu-builder
nishu-builder force-pushed the codex/publish-cli-20260917-911f8bae branch from b9f22d0 to 1ee9da7 Compare September 18, 2026 00:48
@nishu-builder
nishu-builder force-pushed the codex/publish-cli-20260917-911f8bae branch from 1ee9da7 to 2265467 Compare September 18, 2026 01:12
@nishu-builder
nishu-builder removed this pull request from stack #255 September 18, 2026 07:50
@nishu-builder
nishu-builder added this pull request to stack #257 September 18, 2026 07:51
@nishu-builder
nishu-builder force-pushed the codex/publish-cli-20260917-911f8bae branch from 2265467 to 0e0c278 Compare September 18, 2026 10:52
@nishu-builder
nishu-builder removed this pull request from stack #257 September 18, 2026 10:52
@nishu-builder
nishu-builder added this pull request to stack #257 September 18, 2026 10:52
@nishu-builder
nishu-builder removed this pull request from stack #257 September 18, 2026 10:53
@nishu-builder
nishu-builder added this pull request to stack #261 September 18, 2026 10:53
@nishu-builder
nishu-builder force-pushed the codex/publish-cli-20260917-911f8bae branch from 0e0c278 to 57ee442 Compare September 18, 2026 19:52
@nishu-builder
nishu-builder merged commit 5c8e060 into main Sep 18, 2026
2 checks passed
@nishu-builder
nishu-builder deleted the codex/publish-cli-20260917-911f8bae branch September 18, 2026 20:07
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.

1 participant