Skip to content

feat(git): own short-lived helper invocations - #12

Closed
zhiiw wants to merge 2 commits into
codex/gitoxide-helper-artifact-authorityfrom
codex/gitoxide-short-lived-invocation
Closed

zhiiw wants to merge 2 commits into
codex/gitoxide-helper-artifact-authorityfrom
codex/gitoxide-short-lived-invocation

Conversation

@zhiiw

@zhiiw zhiiw commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

This stacked Draft adds one production-shaped invariant above the opaque helper artifact capability in #11:

Runtime Host can launch exactly one short-lived Gitoxide helper only through the designated owner-bound capability, with fixed argv/environment/protocol, bounded I/O, timeout/cancellation, and an exact exit-code/JSON contract.

Exit 0 is accepted only with an exact SHA-1 repository observation; exit 2 only with an unsupported-object-format policy rejection; exit 1 only with an allowlisted stable helper error. Every other exit/response combination fails closed.

Boundary

  • Owner: one Runtime Host helper invocation.
  • Atomic boundary: artifact revalidation followed by one bounded helper process and one exact response.
  • Failure states: invalid request, spawn failure, timeout, abort, output overflow, malformed protocol, stable helper operation failure.
  • Rollback: none; repository inspection is read-only.

The three-platform workflow builds the real Rust helper and runs the Runtime Host contract against it. This remains a Draft because the packaged-release signing trust root and Desktop/CLI/managed-workspace consumer are intentionally not part of this slice.

Verification

  • Runtime Host TypeScript build
  • Real helper invocation contract: SHA-1 success, SHA-256 rejection, unborn SHA-1 failure
  • Existing Rust helper protocol: 4 passing tests
  • Biome and git diff --check
中文说明

这个 stacked Draft 在 opaque artifact capability 之上只增加一个不变量:Runtime Host 只能通过指定 owner 的 capability 启动一次短生命周期 Gitoxide helper;argv、环境、协议、超时和 I/O 上限全部固定。

exit 0 只接受严格 SHA-1 observation;exit 2 只接受 unsupported object format;exit 1 只接受 allowlist 内的稳定 helper failure。exit code 与 JSON 不一致时统一 fail closed。

三平台 workflow 会编译真实 Rust helper,并由 Runtime Host 验证 SHA-1 成功、SHA-256 拒绝、unborn SHA-1 失败。正式发布签名信任根及 Desktop/CLI/managed-workspace 消费者不在本切片内,因此继续保持 Draft。

@zhiiw
zhiiw force-pushed the codex/gitoxide-helper-artifact-authority branch from 0b49d95 to 4d8b111 Compare August 23, 2026 16:29
@zhiiw
zhiiw force-pushed the codex/gitoxide-short-lived-invocation branch from 66d7a0c to 1e43dcd Compare August 23, 2026 16:29
@zhiiw
zhiiw force-pushed the codex/gitoxide-helper-artifact-authority branch from 4d8b111 to b787ffd Compare August 23, 2026 16:32
@zhiiw
zhiiw force-pushed the codex/gitoxide-short-lived-invocation branch from 1e43dcd to 798dc8c Compare August 23, 2026 16:32
@zhiiw
zhiiw force-pushed the codex/gitoxide-helper-artifact-authority branch from b787ffd to f37f761 Compare August 24, 2026 04:04
@zhiiw
zhiiw force-pushed the codex/gitoxide-short-lived-invocation branch from 798dc8c to 39b5ebf Compare August 24, 2026 04:04
@zhiiw

zhiiw commented Aug 24, 2026

Copy link
Copy Markdown
Owner Author

Superseded by apache#3561. Its implementation and tests were rebuilt from the latest upstream main and included there as part of the consolidated Gitoxide repository admission/import invariant. This extraction PR remains available as design and review history.

中文说明

本 PR 已由 apache#3561 取代。对应实现和测试已从最新 upstream main 重建,并作为完整的 Gitoxide repository admission/import 不变量合入该 Draft。这里继续保留为设计和评审历史。

@zhiiw zhiiw closed this Aug 24, 2026
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