Skip to content

[followup] gh-egress gate refusal 專屬 exit-code band — 與 gh 原生碼空間解耦 (follow-up finding from #117 verify) #227

Description

@kiki830621

Problem

gh-egress 的 gate refusal exit code 4gh 自身的錯誤碼空間重疊(gh 部分 subcommand 以 4 表 auth 失敗、1 表一般錯誤;wrapper exec gh 後其碼原樣透出)。unattended caller(idd-all / idd-all-chain)以 $? 分流時無法區分「gate 拒絕 → 改 body 重派」vs「gh auth 過期 → re-login」— 兩者補救方向相反。#117 mention net 讓大量真實 refusal 走 4,血量放大(cluster verify DA-X-1)。

Type

enhancement(exit-code 契約設計)

Expected

gate refusal 保留專屬碼帶(如 ≥10:10=privacy net、11=mention net、12=unscannable body-file…),或文件化「caller 必須 parse stderr 而非 $?」。碼帶變更屬 breaking-ish — 需同步 callers 與測試。

Actual

2/3/4/5 與 gh 原生碼空間交錯;4 承載三種不同 refusal 語意。

Source: /idd-verify cluster #203+#117 R2(DA-X-1)— 2026-07-06

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions