[verified] Expose canonical broker roles in CLI and docs

This commit is contained in:
2026-10-12 06:01:42 +00:00
parent 7b4b5e72f3
commit 4acc28563c
3 changed files with 61 additions and 2 deletions
+3 -1
View File
@@ -90,12 +90,14 @@ Broker 응답은 action별 계약이다. 다른 action의 필드가 있다고
### Canonical command templates
`serve --role`은 기존 `ROLES`의 정확한 값 `gitea-spec-agent`, `gitea-impl-agent`, `gitea-review-agent`만 허용한다. `spec`/`impl`/`review` 축약, 대소문자·공백 변형 및 다른 role은 허용하지 않는다. `serve --help`와 invalid-choice 진단에서 같은 목록을 표시하며 잘못된 값은 runtime 생성 전에 exit 2로 거절한다. 아래는 spec 실행 예제이며 impl/review 호출자는 자신의 정확한 canonical role을 사용한다. Role 문자열은 같은 UID 내 workflow metadata이며 authorization 또는 추가 권한을 부여하지 않는다. 기존 filesystem UID 보안 경계와 constructor 검증은 그대로 유지한다.
```sh
# Runtime paths come only from broker ready JSON; never create them or read the token.
python3 <harness-root>/harness/lib/managed_lock_broker.py serve \
--root <harness-root> \
--owner <owner> --repository <repository> --issue <issue-number> \
--role <role> --run-id <workflow-run-id> \
--role gitea-spec-agent --run-id <workflow-run-id> \
--ttl-seconds <ttl-seconds>
# Parse only public paths from ready JSON; do not print token-bearing fields.
HANDLE=<ready-json-HANDLE>