GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(fleet): gh sync verbs for scripted flows (#10973) by dezren39 · Pull Request #13155 · developing-today/code

feat(fleet): gh sync verbs for scripted flows (#10973) #13155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
dezren39 merged 2 commits into main from xaltha/10973-gh-queue-sync
Nov 24, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

feat(fleet): gh sync verbs for scripted flows (#10973) #13155

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit Hold shift + click to select a range
d142839
feat(fleet): gh sync verbs for scripted flows (#10973)
dezren39 Nov 23, 2026
c6f9628
Rebase-merge origin/main into xaltha/10973-gh-queue-sync (conflicts: …
dezren39 Nov 24, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

15 changes: 14 additions & 1 deletion 15 pkgs/fleet/crates/fleet-registry/src/lib.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,20 @@ pub const DOMAINS: &[Domain] = &[
capabilities: &[Capability::Gh],
primary: Capability::Gh,
aliases: &[],
subcommands: &["tiers", "cache-serve", "cache-status", "closures"],
subcommands: &[
"tiers",
"cache-serve",
"cache-status",
"closures",
"sync-labels",
"sync-view",
"sync-comment",
"sync-issue-create",
"sync-issue-get",
"sync-labels-add",
"sync-label-ensure",
"sync-issue-close",
],
},
Domain {
name: "bridge",
Expand Down
34 changes: 33 additions & 1 deletion 34 pkgs/fleet/crates/fleet/src/gh.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ use crate::gh_cache;
use crate::gh_closure;
use crate::gh_guard;
use crate::gh_metadata;
use crate::gh_sync;
use fleet_config::{Config, DEFAULT_GH_CACHE_PORT};
use fleet_secrets::Resolver;
use std::io::{IsTerminal, Write};
Expand Down Expand Up @@ -189,7 +190,20 @@ FLEET_GH_CACHE as a comma list; an address without a port gets port
`fleet gh cache-status` probes the configured daemons. `--cache-addr`
overrides every daemon address for one call; `--no-cache` resolves
in-process. When no daemon answers, the call resolves in-process and
says so on stderr — never silently.";
says so on stderr — never silently.

Sync verbs (code#10973, step 2.2 of #9016): the `sync-*` shadow
verbs are the typed Queue/GitHub sync surface for scripted flows
(pm-stack dispatch's fallback, the opencode claimant, job bodies).
Each declares its whole command line, validates it strictly, and
rewrites to the canonical gh call before the guard, closure and
metadata layers run, inheriting the rotation and the retry-safety
rule. `fleet gh sync-labels --repo OWNER/REPO <issue|pr> <n>` prints
an item's label names as JSON; `sync-view` prints labels,state,title
JSON; `sync-comment` posts a comment (`--body` or `--body-file`);
`sync-issue-create`, `sync-issue-get`, `sync-labels-add`,
`sync-label-ensure` and `sync-issue-close` (fleet closure reasons)
cover the issue writes dispatch composes. See gh_sync.rs.";

/// The fleet's GitHub Apps, in rotation order. Each carries its
/// private key (and, except the fleet App whose ID is a public
Expand Down Expand Up @@ -1500,6 +1514,24 @@ pub fn run(config: &Config, args: &[String]) -> i32 {
if args.first().is_some_and(|a| a == "closures") {
return run_closures(&args[1..]);
}
// Sync verbs (#10973, step 2.2 of #9016): strictly-parsed typed
// verbs that rewrite to the canonical gh call. The rewrite is
// applied here, before the close guard, the closure layer and
// the metadata create path parse the arguments, so a sync call
// inherits every passthrough control — and the rotation below —
// exactly as the hand-written call it replaces would have.
let sync_rewrite;
let args: &[String] = match gh_sync::parse(args) {
Comment thread
Comment on lines +1548 to +1549

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 23, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Preserve migrated reads under the raw-mode environment

When a claimant or dispatch process inherits FLEET_GH_RAW=1, the early return in gh::run at lines 1485–1488 executes before this rewrite and forwards sync-* arguments unchanged to the real gh binary. Raw mode is a documented identity-pinning escape hatch (doc/fleet/gh-credential-lifecycle.md:204–213), and checking gh sync-labels --help confirms the result: unknown command "sync-labels" for "gh". Previously the migrated callers supplied ordinary issue/pr commands that worked in that environment; now their label/state reads fail, causing the claimant's fail-closed checks to prevent launches. Account for the sync translation when handling inherited raw mode.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Ok(Some(canonical)) => {
sync_rewrite = canonical;
&sync_rewrite
}
Ok(None) => args,
Err(e) => {
eprintln!("{e}");
return EXIT_USAGE;
}
};
let guard_intent = match gh_guard::parse(args) {
Ok(intent) => intent,
Err(e) => {
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.