Skip to content

Add a general GitHub CLI worker - #253

Closed
nishu-builder wants to merge 1 commit into
mainfrom
codex/publish-github-worker-20260917-911f8bae
Closed

nishu-builder wants to merge 1 commit into
mainfrom
codex/publish-github-worker-20260917-911f8bae

Conversation

@nishu-builder

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

Copy link
Copy Markdown
Contributor

Add std/github with GitHub CLI and pinned gh-stack v0.1.1. It accepts an explicit repository, literal arguments, optional stdin and a granted GitHub token, without a source checkout.

A durable compare-and-swap claim allows one execution per invocation. A failed claim with no stored owner is retryable. After gh executes, retry only result upload and CAS bookkeeping, up to three times; never rerun the command. Completed retries reuse the result and unfinished claims remain uncertain.

Claims bind the full pinned ArgTree, including worker and credential identity. The agent resumes the stored task. Share repository spelling validation through git-locator. The real-Git unit fixture covers competing claims, a rejected claim, transient result-write rejection and result reuse.

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 6/8. The claim protocol (create-only CAS on refs/caos/github/<invocation>, owner-only recovery after a lost push reply, result commit chained on the claim, never stolen) is implemented as designed, and the 8-thread unit test plus the version/repeat/changed-args cases in tests/github are the right shape. Isolated GH_CONFIG_DIR/XDG_DATA_HOME, GH_REPO pinned, prompts and pagers off, stdin via a file, and caos put for the scrub all look correct. The extension is exercised by actually running it, which is what the design asked for.

Three inline comments. The one I would fix: a failed claim push with the ref still absent returns a cached uncertain result although nothing was claimed and nothing ran, so a transient error on the claim converts that tool call into "inspect GitHub" permanently. The other two are about durability of the record (it binds the full ArgTree, so a redeploy or secret re-init makes a resumed call fail as "different request") and about bookkeeping failures after gh succeeded turning into permanent uncertainty.


Generated by Claude Code

Comment thread std/github/src/main.rs Outdated
Comment thread std/github/src/main.rs
Comment thread std/github/src/main.rs Outdated
@nishu-builder
nishu-builder force-pushed the codex/publish-github-worker-20260917-911f8bae branch from 612f156 to 2ebd576 Compare September 18, 2026 00:03
@nishu-builder
nishu-builder force-pushed the codex/publish-github-worker-20260917-911f8bae branch from 2ebd576 to 9f4fcd9 Compare September 18, 2026 00:48
@nishu-builder
nishu-builder force-pushed the codex/publish-github-worker-20260917-911f8bae branch 2 times, most recently from f0d6847 to f686d9b Compare September 18, 2026 07:50
@nishu-builder
nishu-builder removed this pull request from stack #255 September 18, 2026 07:50
@nishu-builder
nishu-builder changed the base branch from codex/publish-agent-20260917-911f8bae to codex/publish-ignore-20260918-911f8bae September 18, 2026 07:51
@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-github-worker-20260917-911f8bae branch from f686d9b to e985bef 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-github-worker-20260917-911f8bae branch from e985bef to ca2c7ea Compare September 18, 2026 19:52
Base automatically changed from codex/publish-ignore-20260918-911f8bae to main September 18, 2026 19:53
@nishu-builder
nishu-builder force-pushed the codex/publish-github-worker-20260917-911f8bae branch 2 times, most recently from cec3323 to 71109e3 Compare September 19, 2026 01:44

Copy link
Copy Markdown
Contributor Author

Closing with the rest of stack #261. #300 replaces this: GitHub calls go through an inline github tool in llm-step that talks to the REST API, not a gh worker. The implementation follows in a PR stacked on #300.


Generated by Claude Code

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